<template>
    <bpm-toolbar :bpmformdata="formData">
  
        <!-- <template #btn-left>
    <button @click="closeWebView">关闭</button>
  </template> -->
        <!-- <template #btn-right>
  <button>right</button>
  </template>   -->
    </bpm-toolbar>
    <div class="wrap">
        <div class="form">
            <div class="center bg-white">
                <bpm-basicinfo :bpmformdata="formData"></bpm-basicinfo>
  
                <userpick :parmdialog="parmdialog" v-on:closedialog="closedialog" v-on:requseturl="userpickCallBack">
                </userpick>
  
                <bpm-forminfo :bpmformdata="formData" :hideformsubject='hideFormSubject'>
                    <template v-slot:default="scope">
                        <el-form ref="bpmform" :model="scope.data">
                            <el-row>
  
                                <el-col :xs="24" :sm="12" :md="12" :lg="12">
                                    <el-form-item :label="$tf('Form.ISAgent')">
                                        <el-radio :disabled="!isEdit" v-model="scope.data.ISAgent" label="1"
                                            v-on:change="isAgentChange">{{ $tf('Form.Yes') }}</el-radio>
                                        <el-radio :disabled="!isEdit" v-model="scope.data.ISAgent" label="2"
                                            v-on:change="isAgentChange">{{ $tf('Form.No') }}</el-radio>
                                    </el-form-item>
                                </el-col>
  
                                <el-col :xs="24" :sm="12" :md="12" :lg="12">
                                    <el-form-item :label="$tf('Form.ApplicantBadge')" :required="true">
                                        <el-input v-model="scope.data.ApplicantBadge" :readonly="true" placeholder=""
                                            :disabled="!isEdit">
                                            <template #append>
                                                <el-button :disabled="!isEdit || isAgentDisable" v-on:click="SelectBadge">
                                                    <el-icon>
                                                        <UserFilled />
                                                    </el-icon>
                                                </el-button>
                                            </template>
  
                                        </el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>
                            <el-row>
  
                                <el-col :xs="24" :sm="12" :md="12" :lg="12">
                                    <el-form-item :label="$tf('Form.Applicant')">
                                        <el-input v-model="scope.data.Applicant" disabled placeholder=""></el-input>
                                    </el-form-item>
                                </el-col>
  
                                <el-col :xs="24" :sm="12" :md="12" :lg="12">
                                    <el-form-item :label="$tf('Form.Floor')">
                                        <el-input v-model="scope.data.Floor" disabled placeholder=""></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>
                            <el-row>
  
                                <el-col :xs="24" :sm="12" :md="12" :lg="12">
                                    <el-form-item :label="$tf('Form.Room')">
                                        <el-input v-model="scope.data.Room" disabled placeholder=""></el-input>
                                    </el-form-item>
                                </el-col>
  
                                <el-col :xs="24" :sm="12" :md="12" :lg="12">
                                    <el-form-item :label="$tf('Form.GroupLeader')">
                                        <el-input v-model="scope.data.GroupLeader" disabled placeholder=""></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>
                            <el-row>
  
                                <el-col :xs="24" :sm="12" :md="12" :lg="12">
                                    <el-form-item :label="$tf('Form.Jobcname')">
                                        <el-input v-model="scope.data.Jobcname" disabled placeholder=""></el-input>
                                    </el-form-item>
                                </el-col>
  
                                <el-col :xs="24" :sm="12" :md="12" :lg="12">
                                    <el-form-item :label="$tf('Form.Depcname')">
                                        <el-input v-model="scope.data.Depcname" disabled placeholder=""></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>
                            <el-row>
  
                                <el-col :xs="24" :sm="12" :md="12" :lg="12">
                                    <el-form-item :label="$tf('Form.Site')">
                                        <el-input v-model="scope.data.Site" disabled placeholder=""></el-input>
                                    </el-form-item>
                                </el-col>
  
                                <el-col :xs="24" :sm="12" :md="12" :lg="12">
                                    <el-form-item :label="$tf('Form.CostCenter')">
                                        <el-input v-model="scope.data.CostCenter" disabled placeholder=""></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>
  
  
                        </el-form>
  
                        <section style="margin-top:30px">
                          <bpm-collapse :header-title="$tf('Form.RequestEquipmentInformation')" ref="headersubtitle">
                       
                            <!-- <headersubtitle :header-title="$tf('Form.RequestEquipmentInformation')" ref="headersubtitle"> -->
                                <el-form label-position="left" class="demo-ruleForm" inline-message size="mini"
                                    v-on:submit.native.prevent label-width="130px">
                                    <el-row>
  
                                        <el-col :xs="24" :sm="12" :md="12" :lg="12">
                                            <el-form-item :label="$tf('Form.InstallComputerType')">
                                                <el-input v-model="formData.vmFormContent.InstallComputerType"
                                                    placeholder="" :disabled="!isEdit" maxlength="50"></el-input>
                                            </el-form-item>
                                        </el-col>
  
                                        <el-col :xs="24" :sm="12" :md="12" :lg="12">
                                            <el-form-item :label="$tf('Form.ComputerName')" :required="true">
                                                <el-input v-model="formData.vmFormContent.ComputerName" placeholder=""
                                                    :disabled="!isEdit" maxlength="50"></el-input>
                                            </el-form-item>
                                        </el-col>
                                    </el-row>
                                    <el-row>
  
                                        <el-col :xs="24" :sm="12" :md="12" :lg="12">
                                            <el-form-item :label="$tf('Form.SoftwareType')" :required="true">
                                                <el-select filterable v-if="isEdit" :disabled="!isEdit"
                                                    v-model="formData.vmFormContent.SoftwareType"
                                                    v-on:change="softwareTypeChange">
                                                    <el-option v-for="(item, index) in softwareTypeArr" :key="index"
                                                        :label="langu == 'cn' ? item.Name : item.EName"
                                                        :value="item.Code"></el-option>
                                                </el-select>
                                                <el-select filterable v-else :disabled="isNodeDisable"
                                                    v-model="formData.vmFormContent.SoftwareType"
                                                    v-on:change="softwareTypeChange">
                                                    <el-option v-for="(item, index) in softwareTypeArr" :key="index"
                                                        :label="langu == 'cn' ? item.Name : item.EName"
                                                        :value="item.Code"></el-option>
                                                </el-select>
                                            </el-form-item>
                                        </el-col>
  
                                        <el-col :xs="24" :sm="12" :md="12" :lg="12">
                                            <el-form-item :label="$tf('Form.SoftwareName')" :required="true">
                                                <el-input v-model="formData.vmFormContent.SoftwareName" v-if="isEdit"
                                                    class="input-with-select" size="mini"
                                                    :disabled="!isEdit || formData.vmFormContent.SoftwareType != '3'">
                                                    <template #append>
                                                        <el-button v-on:click="isShowReportSPASoftwareList(true)"
                                                            size="mini" :disabled="!isEdit">
                                                            <el-icon>
                                                                <MoreFilled />
                                                            </el-icon>
                                                        </el-button>
                                                    </template>
                                                </el-input>
                                                <el-input v-model="formData.vmFormContent.SoftwareName" v-else
                                                    class="input-with-select" size="mini" :disabled="isNodeDisable">
                                                    <template #append>
                                                        <el-button v-on:click="isShowReportSPASoftwareList(true)"
                                                            size="mini" :disabled="isNodeDisable">
                                                            <el-icon>
                                                                <MoreFilled />
                                                            </el-icon>
                                                        </el-button>
                                                    </template>
                                                </el-input>
                                            </el-form-item>
                                        </el-col>
                                    </el-row>
                                    <el-row>
  
                                        <el-col :xs="24" :sm="12" :md="12" :lg="12"
                                            v-if="formData.vmFormContent.isSoftwareVersionHidden">
                                            <el-form-item :label="$tf('Form.SoftwareVersion')" :required="true">
                                                <el-input v-if="isEdit" v-model="formData.vmFormContent.SoftwareVersion"
                                                    :disabled="!isEdit"></el-input>
                                                <el-input v-else v-model="formData.vmFormContent.SoftwareVersion"
                                                    :disabled="isNodeDisable"></el-input>
                                            </el-form-item>
                                        </el-col>
                                        <el-col :xs="24" :sm="12" :md="12" :lg="12" v-else>
                                            <el-form-item :label="$tf('Form.SoftwareVersion')" :required="true">
                                                <el-select filterable v-if="isEdit" :disabled="!isEdit"
                                                    v-model="formData.vmFormContent.SoftwareVersion"
                                                    v-on:change="softwareVersionMatch">
                                                    <el-option
                                                        v-for="(item, index) in formData.vmFormContent.softwareVersionArr"
                                                        :key="index" :label="item.SoftwareVersion"
                                                        :value="item.SoftwareVersion"></el-option>
                                                </el-select>
                                                <el-select filterable v-else :disabled="isNodeDisable"
                                                    v-model="formData.vmFormContentSoftwareVersion"
                                                    v-on:change="softwareVersionMatch">
                                                    <el-option
                                                        v-for="(item, index) in formData.vmFormContent.softwareVersionArr"
                                                        :key="index" :label="item.SoftwareVersion"
                                                        :value="item.SoftwareVersion"></el-option>
                                                </el-select>
                                            </el-form-item>
                                        </el-col>
  
                                        <el-col :xs="24" :sm="12" :md="12" :lg="12">
                                            <el-form-item :label="$tf('Form.OriginalSoftwareManufacturer')">
                                                <el-input v-model="formData.vmFormContentOriginalSoftwareManufacturer"
                                                    v-if="isEdit"
                                                    :disabled="!isEdit || !formData.vmFormContent.isSoftwareVersionHidden"></el-input>
                                                <el-input v-model="formData.vmFormContentOriginalSoftwareManufacturer"
                                                    v-else :disabled="isNodeDisable"></el-input>
                                            </el-form-item>
                                        </el-col>
                                    </el-row>
                                    <el-row>
  
                                        <el-col :xs="24" :sm="12" :md="12" :lg="12">
                                            <el-form-item :label="$tf('Form.InstallationPackage')">
                                                <el-radio v-if="isEdit"
                                                    :disabled="!isEdit || formData.vmFormContent.SoftwareType != '3'"
                                                    v-model="formData.vmFormContent.InstallationPackage" label="1">{{
                                                    $tf('Form.Yes') }}</el-radio>
                                                <el-radio v-else :disabled="isNodeDisable"
                                                    v-model="formData.vmFormContent.InstallationPackage" label="1">{{
                                                    $tf('Form.Yes') }}</el-radio>
                                                <el-radio v-if="isEdit"
                                                    :disabled="!isEdit || formData.vmFormContent.SoftwareType != '3'"
                                                    v-model="formData.vmFormContent.InstallationPackage" label="2">{{
                                                    $tf('Form.No') }}</el-radio>
                                                <el-radio v-else :disabled="isNodeDisable"
                                                    v-model="formData.vmFormContent.InstallationPackage" label="2">{{
                                                    $tf('Form.No') }}</el-radio>
                                            </el-form-item>
  
                                        </el-col>
  
                                        <el-col :xs="24" :sm="12" :md="12" :lg="12">
                                            <el-form-item :label="$tf('Form.Charge')">
                                                <el-radio v-if="isEdit"
                                                    :disabled="!isEdit || formData.vmFormContent.SoftwareType != '3'"
                                                    v-model="formData.vmFormContent.Charge" label="1">{{ $tf('Form.Yes')
                                                    }}</el-radio>
                                                <el-radio v-else :disabled="isNodeDisable"
                                                    v-model="formData.vmFormContent.Charge" label="1">{{ $tf('Form.Yes')
                                                    }}</el-radio>
                                                <el-radio v-if="isEdit"
                                                    :disabled="!isEdit || formData.vmFormContent.SoftwareType != '3'"
                                                    v-model="formData.vmFormContent.ChargeCharge" label="2">{{
                                                    $tf('Form.No') }}</el-radio>
                                                <el-radio v-else :disabled="isNodeDisable"
                                                    v-model="formData.vmFormContent.Charge" label="2">{{ $tf('Form.No')
                                                    }}</el-radio>
                                            </el-form-item>
                                        </el-col>
                                    </el-row>
                                    <el-row>
  
                                        <el-col :xs="24" :sm="12" :md="12" :lg="12">
                                            <el-form-item :label="$tf('Form.Quantity')" :required="true">
                                                <el-input v-model="formData.vmFormContent.Quantity" disabled
                                                    placeholder=""></el-input>
                                            </el-form-item>
                                        </el-col>
  
                                        <el-col :xs="24" :sm="12" :md="12" :lg="12" v-if="!isBudgetNumberHidden">
                                            <el-form-item :label="$tf('Form.BudgetNumber')" :required="true">
                                                <el-input v-model="formData.vmFormContent.BudgetNumber" placeholder=""
                                                    :disabled="!isEdit"></el-input>
                                            </el-form-item>
                                        </el-col>
                                    </el-row>
                                    <el-row>
  
                                        <el-col :span="24">
  
                                            <el-form-item :label="$tf('Form.ReasonForApplication')" :lable-width="500"
                                                id="TabDiv" :required="true">
  
                                                <el-input type="textarea" :rows="2" :disabled="!isEdit"
                                                    v-model="formData.vmFormContent.ReasonForApplication" maxlength="500"
                                                    show-word-limit class="leav" style="margin-left:-9% !important">
                                                </el-input>
                                            </el-form-item>
                                        </el-col>
                                    </el-row>
  
                                </el-form>
                            <!-- </headersubtitle> -->
                          </bpm-collapse>
                        </section>
  
                        <section style="margin-top:30px" v-if="formData.vmOperation.ActivityName == '040_IT部门采购'">
                            <headersubtitle :header-title="$tf('Form.DetailSPASoftwareLists')" ref="headersubtitle">
                                <el-table :data="formData.vmFormContent.reportSPASoftwareLists" border style="width: 100%">
                                    <el-table-column :label="$tf('Form.IDX')" type="index" width="55" show-overflow-tooltip
                                        align="center" :key="Math.random()">
                                    </el-table-column>
  
                                    <el-table-column prop="Site" :label="$tf('Form.Site')" width="180">
                                        <template slot-scope="scope">
                                            <el-form :model="scope.row" v-on:submit.native.prevent>
                                                <el-form-item size="mini" label-width="0">
                                                    <el-select v-model="scope.row.Site" class="sapd" filterable
                                                        :disabled="scope.row.Site == '公共'">
                                                        <el-option v-for="(item, index) in siteArr" :key="index"
                                                            :label="item.site" :value="item.site"></el-option>
                                                    </el-select>
                                                </el-form-item>
                                            </el-form>
                                        </template>
                                    </el-table-column>
  
                                    <el-table-column prop="Depcname" :label="$tf('Form.Depcname')" width="180">
                                        <template slot-scope="scope">
                                            <el-form :model="scope.row" v-on:submit.native.prevent>
                                                <el-form-item size="mini" label-width="0">
                                                    <el-select v-model="scope.row.Depcname" class="sapd" filterable
                                                        :disabled="scope.row.Depcname == '公共'">
                                                        <el-option v-for="(item, index) in depcnameArr" :key="index"
                                                            :label="item.DeptName" :value="item.DeptName"></el-option>
                                                    </el-select>
                                                </el-form-item>
                                            </el-form>
                                        </template>
                                    </el-table-column>
  
                                    <el-table-column prop="SoftwareType" :label="$tf('Form.SoftwareType')" width="180">
                                        <template slot-scope="scope">
                                            <el-form :model="scope.row" v-on:submit.native.prevent>
                                                <el-form-item size="mini" label-width="0" :required="true">
                                                    <el-select filterable v-model="scope.row.SoftwareType" :disabled="true">
                                                        <el-option v-for="(item, index) in softwareTypeArr" :key="index"
                                                            :label="langu == 'cn' ? item.Name : item.EName"
                                                            :value="item.Code"></el-option>
                                                    </el-select>
                                                </el-form-item>
                                            </el-form>
                                        </template>
                                    </el-table-column>
  
                                    <el-table-column prop="SoftwareName" :label="$tf('Form.SoftwareName')" width="180">
                                        <template slot-scope="scope">
                                            <el-form :model="scope.row" v-on:submit.native.prevent>
                                                <el-form-item size="mini" label-width="0" :required="true">
                                                    <el-input v-model="scope.row.SoftwareName" maxlength="20"></el-input>
                                                </el-form-item>
                                            </el-form>
                                        </template>
                                    </el-table-column>
  
                                    <el-table-column prop="SoftwareVersion" :label="$tf('Form.SoftwareVersion')"
                                        width="180">
                                        <template slot-scope="scope">
                                            <el-form :model="scope.row" v-on:submit.native.prevent>
                                                <el-form-item size="mini" label-width="0" :required="true">
                                                    <el-input v-model="scope.row.SoftwareVersion" maxlength="20"></el-input>
                                                </el-form-item>
                                            </el-form>
                                        </template>
                                    </el-table-column>
  
                                    <el-table-column prop="OriginalSoftwareManufacturer"
                                        :label="$tf('Form.OriginalSoftwareManufacturer')" width="180">
                                        <template slot-scope="scope">
                                            <el-form :model="scope.row" v-on:submit.native.prevent>
                                                <el-form-item size="mini" label-width="0">
                                                    <el-input v-model="scope.row.OriginalSoftwareManufacturer"
                                                        maxlength="20"></el-input>
                                                </el-form-item>
                                            </el-form>
                                        </template>
                                    </el-table-column>
  
                                    <el-table-column prop="InstallationPackage" :label="$tf('Form.InstallationPackage')"
                                        width="180">
                                        <template slot-scope="scope">
                                            <el-form :model="scope.row" v-on:submit.native.prevent>
                                                <el-form-item size="mini" label-width="0" :required="true">
                                                    <el-select filterable v-model="scope.row.InstallationPackage">
                                                        <el-option v-for="(item, index) in whetherArr" :key="index"
                                                            :label="langu == 'cn' ? item.Name : item.EName"
                                                            :value="item.Code"></el-option>
                                                    </el-select>
                                                </el-form-item>
                                            </el-form>
                                        </template>
                                    </el-table-column>
  
                                    <el-table-column prop="Charge" :label="$tf('Form.Charge')" width="180">
                                        <template slot-scope="scope">
                                            <el-form :model="scope.row" v-on:submit.native.prevent>
                                                <el-form-item size="mini" label-width="0" :required="true">
                                                    <el-select filterable v-model="scope.row.Charge" :disabled="true">
                                                        <el-option v-for="(item, index) in whetherArr" :key="index"
                                                            :label="langu == 'cn' ? item.Name : item.EName"
                                                            :value="item.Code"></el-option>
                                                    </el-select>
                                                </el-form-item>
                                            </el-form>
                                        </template>
                                    </el-table-column>
  
                                    <el-table-column prop="LicenseQuotas" :label="$tf('Form.LicenseQuotas')" width="180">
                                        <template slot-scope="scope">
                                            <el-form :model="scope.row" v-on:submit.native.prevent>
                                                <el-form-item size="mini" label-width="0" :required="true">
                                                    <el-input type="number" v-model="scope.row.LicenseQuotas" min="0"
                                                        max="20" v-on:blur="licenseQuotasBlur(scope)"></el-input>
                                                </el-form-item>
                                            </el-form>
                                        </template>
                                    </el-table-column>
  
                                    <el-table-column prop="FreeQuotas" :label="$tf('Form.FreeQuotas')" width="180">
                                        <template slot-scope="scope">
                                            <el-form :model="scope.row" v-on:submit.native.prevent>
                                                <el-form-item size="mini" label-width="0">
                                                    <el-input type="number" v-model="scope.row.FreeQuotas" min="0" max="20"
                                                        disabled></el-input>
                                                </el-form-item>
                                            </el-form>
                                        </template>
                                    </el-table-column>
  
                                    <el-table-column prop="UsedQuotas" :label="$tf('Form.UsedQuotas')" width="180">
                                        <template slot-scope="scope">
                                            <el-form :model="scope.row" v-on:submit.native.prevent>
                                                <el-form-item size="mini" label-width="0">
                                                    <el-input type="number" v-model="scope.row.UsedQuotas" min="0" max="20"
                                                        disabled></el-input>
                                                </el-form-item>
                                            </el-form>
                                        </template>
                                    </el-table-column>
  
                                    <el-table-column prop="RemainingAvailableQuotas"
                                        :label="$tf('Form.RemainingAvailableQuotas')" width="180">
                                        <template slot-scope="scope">
                                            <el-form :model="scope.row" v-on:submit.native.prevent>
                                                <el-form-item size="mini" label-width="0">
                                                    <el-input type="number" v-model="scope.row.RemainingAvailableQuotas"
                                                        min="0" max="20" disabled></el-input>
                                                </el-form-item>
                                            </el-form>
                                        </template>
                                    </el-table-column>
  
                                    <el-table-column prop="PurchaseTime" :label="$tf('Form.PurchaseTime')" width="180">
                                        <template slot-scope="scope">
                                            <el-form :model="scope.row" v-on:submit.native.prevent>
                                                <el-form-item size="mini" label-width="0" :required="true">
                                                    <el-date-picker v-model="scope.row.PurchaseTime" type="date"
                                                        placeholder="" disabled>
                                                    </el-date-picker>
                                                </el-form-item>
                                            </el-form>
                                        </template>
                                    </el-table-column>
  
                                    <el-table-column prop="ExpireDate" :label="$tf('Form.ExpireDate')" width="180">
                                        <template slot-scope="scope">
                                            <el-form :model="scope.row" v-on:submit.native.prevent>
                                                <el-form-item size="mini" label-width="0" :required="true">
                                                    <el-date-picker v-model="scope.row.ExpireDate" type="date"
                                                        placeholder="" disabled>
                                                    </el-date-picker>
                                                </el-form-item>
                                            </el-form>
                                        </template>
                                    </el-table-column>
  
                                    <el-table-column prop="Availability" :label="$tf('Form.Availability')" width="180">
                                        <template slot-scope="scope">
                                            <el-form :model="scope.row" v-on:submit.native.prevent>
                                                <el-form-item size="mini" label-width="0" :required="true">
                                                    <el-select filterable v-model="scope.row.Availability" disabled>
                                                        <el-option v-for="(item, index) in availabilityArr" :key="index"
                                                            :label="langu == 'cn' ? item.Name : item.EName"
                                                            :value="item.Code"></el-option>
                                                    </el-select>
                                                </el-form-item>
                                            </el-form>
                                        </template>
                                    </el-table-column>
  
                                    <el-table-column prop="LicenseKey" :label="$tf('Form.LicenseKey')" width="180">
                                        <template slot-scope="scope">
                                            <el-form :model="scope.row" v-on:submit.native.prevent>
                                                <el-form-item size="mini" label-width="0">
                                                    <el-input v-model="scope.row.LicenseKey" maxlength="20"></el-input>
                                                </el-form-item>
                                            </el-form>
                                        </template>
                                    </el-table-column>
  
                                    <el-table-column prop="License" :label="$tf('Form.License')" width="180">
                                        <template slot-scope="scope">
                                            <el-form :model="scope.row" v-on:submit.native.prevent>
                                                <el-form-item size="mini" label-width="0">
                                                    <el-input v-model="scope.row.License" maxlength="20"></el-input>
                                                </el-form-item>
                                            </el-form>
                                        </template>
                                    </el-table-column>
  
  
                                    <el-table-column prop="License" :label="$tf('Form.LicenseAnnex')" width="200">
                                        <template slot-scope="scope">
                                            <el-form :model="scope.row" v-on:submit.native.prevent>
                                                <el-form-item size="mini" label-width="0">
                                                    <el-button type="primary" size="small"
                                                        v-on:click="licenseAnnexUpload(scope)">{{ $tf('table.Upload')
                                                        }}</el-button>
                                                    <el-button type="primary" size="small"
                                                        v-on:click="seeLicenseAnnexfile(scope)">{{ $tf('table.View')
                                                        }}</el-button>
                                                </el-form-item>
                                            </el-form>
                                        </template>
                                    </el-table-column>
  
                                    <el-table-column prop="Comments" :label="$tf('Form.Comments')" width="180">
                                        <template slot-scope="scope">
                                            <el-form :model="scope.row" v-on:submit.native.prevent>
                                                <el-form-item size="mini" label-width="0">
                                                    <el-input v-model="scope.row.Comments" maxlength="20"></el-input>
                                                </el-form-item>
                                            </el-form>
                                        </template>
                                    </el-table-column>
                                    <el-table-column v-if="isEdit || vmOperation.ActivityName == '040_IT部门采购'"
                                        :show-overflow-tooltip="true" :label="$tf('Form.operating')" width="140">
                                        <template slot-scope="scope">
                                            <el-button type="text" size="small"
                                                v-on:click.native.prevent="deleteDetailSPASoftwareListsRow(scope.$index, vmFormContent.reportSPASoftwareLists)">
                                                <i style="font-size: 20px" class="el-icon-delete"></i>
                                            </el-button>
                                        </template>
                                    </el-table-column>
                                </el-table>
                                <div class="add" v-if="IsDetailSPASoftwareListsAdd" v-on:click="detailSPASoftwareListsAdd"
                                    style="color: #2f405b;">
                                    <i style="font-size: 20px;margin-top: 5px;" class="el-icon-circle-plus"></i>
                                </div>
                            </headersubtitle>
                        </section>
  
  
                        <el-dialog :title="DioTitle" v-model="editT" width="85%" class="TLFormCss"> 
                                <el-form :model="form" label-posiition="left" label-width="155px"
                                    style="padding: 13px 25px 0px 0px; border-bottom:1px solid #ccc ">
                                    <el-row style="width:100%">
                                        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
                                            <el-form-item :label="$tf('table.Site')" :required="true">
                                                <el-select v-model="form.Site" class="sapd" filterable
                                                    :disabled="form.Site == '公共'">
                                                    <el-option v-for="(item, index) in siteArr" :key="index"
                                                        :label="item.site" :value="item.site"></el-option>
                                                </el-select>
                                            </el-form-item>
                                        </el-col>
                                        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
                                            <el-form-item :label="$tf('table.Depcname')" :required="true">
                                                <el-select v-model="form.Depcname" class="sapd" filterable
                                                    :disabled="form.Depcname == '公共'">
                                                    <el-option v-for="(item, index) in depcnameArr" :key="index"
                                                        :label="item.DeptName" :value="item.DeptName"></el-option>
                                                </el-select>
                                            </el-form-item>
                                        </el-col>
                                        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
                                            <el-form-item :label="$tf('table.SoftwareType')" :required="true">
                                                <el-select v-model="form.SoftwareType" class="sapd"
                                                    v-on:change="softwareTypeChangeOfBox">
                                                    <el-option v-for="(item, index) in softwareTypeArr" :key="index"
                                                        :label="langu == 'cn' ? item.Name : item.EName"
                                                        :value="item.Code"></el-option>
                                                </el-select>
                                            </el-form-item>
                                        </el-col>
                                    </el-row>
                                    <el-row style="width:100%">
                                        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
                                            <el-form-item :label="$tf('table.SoftwareName')" :required="true">
                                                <el-input v-model="form.SoftwareName" size="medium"
                                                    maxlength="50"></el-input>
                                            </el-form-item>
                                        </el-col>
                                        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
                                            <el-form-item :label="$tf('table.SoftwareVersion')" :required="true">
                                                <el-input v-model="form.SoftwareVersion" size="medium"
                                                    maxlength="50"></el-input>
                                            </el-form-item>
                                        </el-col>
                                        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
                                            <el-form-item :label="$tf('table.OriginalSoftwareManufacturer')">
                                                <el-input v-model="form.OriginalSoftwareManufacturer" size="medium"
                                                    maxlength="50"></el-input>
                                            </el-form-item>
                                        </el-col>
                                    </el-row>
                                    <el-row style="width:100%">
                                        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
                                            <el-form-item :label="$tf('table.InstallationPackage')" :required="true">
                                                <el-select v-model="form.InstallationPackage" class="sapd">
                                                    <el-option v-for="(item, index) in whetherArr" :key="index"
                                                        :label="langu == 'cn' ? item.Name : item.EName"
                                                        :value="item.Code"></el-option>
                                                </el-select>
                                            </el-form-item>
                                        </el-col>
                                        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
                                            <el-form-item :label="$tf('table.Charge')" :required="true">
                                                <el-select v-model="form.Charge" class="sapd"
                                                    :disabled="form.SoftwareType == '1' || form.SoftwareType == '2'"
                                                    v-on:change="chargeChange">
                                                    <el-option v-for="(item, index) in whetherArr" :key="index"
                                                        :label="langu == 'cn' ? item.Name : item.EName"
                                                        :value="item.Code"></el-option>
                                                </el-select>
                                            </el-form-item>
                                        </el-col>
                                        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
                                            <el-form-item :label="$tf('table.LicenseQuotas')" :required="true">
                                                <el-input v-model="form.LicenseQuotas" size="medium"
                                                    v-on:blur="licenseQuotasBlur(form.LicenseQuotas)"></el-input>
                                            </el-form-item>
                                        </el-col>
                                    </el-row>
                                    <el-row style="width:100%">
                                        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
                                            <el-form-item :label="$tf('table.FreeQuotas')">
                                                <el-input v-model="form.FreeQuotas" size="medium" disabled></el-input>
                                            </el-form-item>
                                        </el-col>
                                        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
                                            <el-form-item :label="$tf('table.UsedQuotas')">
                                                <el-input v-model="form.UsedQuotas" size="medium" disabled></el-input>
                                            </el-form-item>
                                        </el-col>
                                        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
                                            <el-form-item :label="$tf('table.RemainingAvailableQuotas')">
                                                <el-input v-model="form.RemainingAvailableQuotas" size="medium"
                                                    disabled></el-input>
                                            </el-form-item>
                                        </el-col>
                                    </el-row>
                                    <el-row style="width:100%">
                                        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
                                            <el-form-item :label="$tf('table.PurchaseTime')" :required="true">
                                                <el-date-picker v-model="form.PurchaseTime" type="date"
                                                    v-on:change="purchaseTimeChange">
                                                </el-date-picker>
                                            </el-form-item>
                                        </el-col>
                                        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
                                            <el-form-item :label="$tf('table.ExpireDate')" :required="true">
                                                <el-date-picker v-model="form.ExpireDate" type="date"
                                                    v-on:change="expireDateChange">
                                                </el-date-picker>
                                            </el-form-item>
                                        </el-col>
                                        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
                                            <el-form-item :label="$tf('table.Availability')" :required="true">
                                                <el-select v-model="form.Availability" class="sapd" disabled>
                                                    <el-option v-for="(item, index) in availabilityArr" :key="index"
                                                        :label="langu == 'cn' ? item.Name : item.EName"
                                                        :value="item.Code"></el-option>
                                                </el-select>
                                            </el-form-item>
                                        </el-col>
                                    </el-row>
                                    <el-row style="width:100%">
                                        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
                                            <el-form-item :label="$tf('table.LicenseKey')">
                                                <el-input v-model="form.LicenseKey" size="medium" maxlength="50"></el-input>
                                            </el-form-item>
                                        </el-col>
                                        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
                                            <el-form-item :label="$tf('table.License')">
                                                <el-input v-model="form.License" size="medium" maxlength="50"></el-input>
                                            </el-form-item>
                                        </el-col>
  
  
                                    </el-row>
                                    <el-row style="width:100%">
                                        <el-form-item :label="$tf('table.LicenseAnnex')">
                                            <el-button type="primary" size="small"
                                                v-on:click="licenseAnnexUploadOfBox(scope_Edit)">{{ this.$tf('table.Upload')
                                                }}</el-button>
                                            <el-button type="primary" size="small" v-on:click="seefileOfBox(scope_Edit)">{{
                                                this.$tf('table.View') }}</el-button>
                                        </el-form-item>
                                    </el-row>
                                    <el-row style="width:100%">
                                        <el-form-item :label="$tf('table.Comments')">
                                            <el-input v-model="form.Comments" size="medium" maxlength="500"></el-input>
                                        </el-form-item>
                                    </el-row>
                                </el-form> 
                         
                            <template #footer>
                                    <div class="dialog-footer TLFormCssFooter"> </div>
                                        <el-button v-on:click="cancel">{{ $tf('table.cancel') }}</el-button>
                                        <el-button type="primary" v-on:click="changeIn">{{$tf('table.confirm')}}</el-button>
                                   
                            </template>
                        </el-dialog>
  
                        <div class="dialog-wrap">
                            <el-dialog :title="$tf('Form.TheNameOfTheSoftware')" v-model="dialogAssetNumberFlag"
                                :close-on-click-modal="false" :close-on-press-escape="false" :highlight-current-row="true"
                                :max-height="500" width="60%" :show-close="false">
                                <el-form label-position="left" class="demo-ruleForm" inline-message size="mini"
                                    v-on:submit.native.prevent label-width="130px">
                                    <el-row>
                                        <el-col :xs="24" :sm="12" :md="12" :lg="8" :disabled="true">
                                            <el-form-item :label="$tf('Form.SoftwareType')" :required="true">
                                                <el-select filterable
                                                    :disabled="formData.vmFormContent.SoftwareType == '1' || formData.vmFormContent.SoftwareType == '2'"
                                                    v-model="SoftwareTypeSearchInput">
                                                    <el-option v-for="(item, index) in softwareTypeArr" :key="index"
                                                        :label="langu == 'cn' ? item.Name : item.EName"
                                                        :value="item.Code"></el-option>
                                                </el-select>
                                            </el-form-item>
  
                                        </el-col>
                                        <el-col :xs="24" :sm="12" :md="12" :lg="8">
                                            <el-form-item :label="$tf('Form.SoftwareName')">
                                                <el-form-item size="mini" label-width="0">
                                                    <el-input v-model="SoftwareNameSearchInput" maxlength="20"></el-input>
                                                </el-form-item>
                                            </el-form-item>
                                        </el-col>
                                        <el-button type="primary" v-on:click="reportSPASoftwareListSearchBtn" size="mini"
                                            style="margin-left: 10px !important; height: 28px !important; line-height: 14px !important;}">{{
                                            $tf('Form.Search') }}</el-button>
                                    </el-row>
                                </el-form>
                                <el-table :data="currentreportSoftwareList" class="mar-btm-20"
                                    v-on:current-change="checkedTemporary" :height="290">
                                    <el-table-column :label="$tf('Form.Select')" width="55" show-overflow-tooltip
                                        align="center">
                                        <template slot-scope="scope">
                                            <el-radio v-model="temporaryChecked" :label="scope.row"><i></i></el-radio>
                                        </template>
                                    </el-table-column>
                                    <el-table-column prop="SoftwareType" :label="$tf('Form.SoftwareType')"
                                        show-overflow-tooltip align="center">
                                    </el-table-column>
                                    <el-table-column property="SoftwareName" :label="$tf('Form.SoftwareName')"
                                        show-overflow-tooltip align="center"></el-table-column>
  
                                    <el-table-column property="Depcname" :label="$tf('Form.Depcnames')"
                                        show-overflow-tooltip align="center"></el-table-column>
  
                                    <el-table-column property="RemainingAvailableQuotas"
                                        :label="$tf('Form.RemainingAvailableQuotas')" show-overflow-tooltip
                                        align="center"></el-table-column>
                                </el-table>
                                <el-pagination v-on:current-change="reportSPASoftwareListSizeChange"
                                    layout="total, prev, pager, next, jumper" :total=reportSoftwareLists.length
                                    :page-size="dialogPageSize" :current-page="currentPage">
                                </el-pagination>
  
                                <template #footer>
                                    <el-button v-on:click="isShowReportSPASoftwareList(false)" size="mini">{{
                                        $tf('Form.Cancel') }}</el-button>
                                    <el-button type="primary" v-on:click="checkedReportSPASoftwareListEvent" size="mini">{{
                                        $tf('Form.Determine') }}</el-button>
                                </template>
  
                            </el-dialog>
                        </div>
  
                    </template>
                </bpm-forminfo>
                <bpm-attachments :bpmformdata="formData"></bpm-attachments>
                <bpm-remarks :bpmformdata="formData"></bpm-remarks>
                <bpm-processinfo :bpmformdata="formData">
                    <!-- <template #sub="defaultProps" >
                      <button>sub {{defaultProps.isMobile}}</button>
                    </template>  -->
                </bpm-processinfo>
  
                <bpm-processcomment :bpmformdata="formData"></bpm-processcomment>
  
            </div>
        </div>
    </div>
  </template>
  
  <script>
  
  import { UserFilled, Upload, MoreFilled } from '@element-plus/icons-vue'
  import { ElMessage, ElLoading, ElMessageBox } from 'element-plus'
  import { reactive, onMounted, ref, getCurrentInstance } from "vue";
  /* eslint-disable no-unused-vars */
  export default {
    name: 'App',
    components: {
        UserFilled, Upload, MoreFilled
    },
    data() {
        return {
            //流程组件数据
            // formData: KStarForm.vmFormData,
            hideFormSubject: false,
            cancelflag: 'false',
            /*--------申请人信息--------*/
            isAgentDisable: true,
            /*--------申请设备信息--------*/
            isBudgetNumberHidden: true,//预算号是否显示
            /*--------部门采购信息--------*/
            isReportSPASoftwareListsHidden: false,//部门采购信息
            isScoopelHaveValue: false,   //部门采购信息-----附件是否可以编辑      默认不可编辑【false】
            /*--------软件清单记录报表--------*/
            IsDetailSPASoftwareListsAdd: true,
            //弹框
            DioTitle: "编辑信息",
            editT: false,                        //编辑弹出框
            form: {
                Site: "",
                Depcname: "",
                SoftwareType: "",
                SoftwareName: "",
                SoftwareVersion: "",
                OriginalSoftwareManufacturer: "",
                InstallationPackage: "",
                Charge: "",
                LicenseQuotas: "",
                FreeQuotas: "0",
                UsedQuotas: "0",
                RemainingAvailableQuotas: "",
                PurchaseTime: "",
                ExpireDate: "",
                Availability: "",
                LicenseKey: "",
                License: "",
                LicenseAnnex: "",
                AttachmentFileId: "",
                AttachmentDownloadUrl: "",
                AttachmentUploadedDate: "",
                AttachmentUploader: "",
                Disable: "",
                Comments: "",
            },//弹出窗数据
            scope_Edit: {},//记录编辑时选中的行
            file_Temp: {
                LicenseAnnex: "",
                AttachmentFileId: "",
                AttachmentDownloadUrl: "",
                AttachmentUploadedDate: "",
                AttachmentUploader: "",
            },//记录临时附件
  
            siteArr: [],//	数据源改成公司
            depcnameArr: [],//	部门
            softwareTypeArr: [],//	软件类型
            availabilityArr: [],//	软件有效性
            whetherArr: [
                { Name: "是", EName: "Yes", Code: '1' },
                { Name: "否", EName: "No", Code: '2' }],//	是否
            reportSoftwareLists: [],// 软件清单List
            currentreportSoftwareList: [],               // 当前搜索reportSoftwareLists数据
            temporaryChecked: {},               // 暂存选中的软件
            SoftwareTypeSearchInput: "",               // 弹窗搜索关键字
            SoftwareNameSearchInput: "",               // 弹窗搜索关键字
            dialogPageSize: 5,                  // 弹框分页显示数量
            currentPage: 1,                     // 当前页
            dialogAssetNumberFlag: false,       // list弹窗flag
            langu: "cn",
            parmdialog: {
                dialogvisible: false,
                clicktype: '',
                type: '',
                ctype: '',
                title: "选人控件",
                multiplelimit: false
            },
            loading: false,               //上传附件加载框
  
        };
    },
    created: function () {
        var that = this;
        // KStarForm.vmFormData = this.formData;
        // KStarForm.init(that,"CommonForm");
    },
    methods: {
        /*----------申请人信息----------*/
        getApplicantInformationOfBadge: function (val) {
            var userBadge = val;
            var _this = this;
            axios.post(KStarForm.bpmBaseUrl + '/Purchase/PurchaseIndex/SearchUser?badge=' + userBadge).then(function (res) {
                var userInfo = eval(res.data.data)
                KStarForm.vmFormData.vmFormContent.ApplicantBadge = userInfo[0].Badge// 工号
                KStarForm.vmFormData.vmFormContent.ApplicantAccount = userInfo[0].UserAccount// 工号
                KStarForm.vmFormData.vmFormContent.Applicant = userInfo[0].UserName// 申请人
                KStarForm.vmFormData.vmFormContent.Floor = userInfo[0].userfloor// 楼号
                KStarForm.vmFormData.vmFormContent.Room = userInfo[0].userroom// 房间号
                KStarForm.vmFormData.vmFormContent.GroupLeader = userInfo[0].groupleader// 直属领导
                KStarForm.vmFormData.vmFormContent.GroupLeaderBadge = userInfo[0].groupleaderBadge// 直属领导Badge
                KStarForm.vmFormData.vmFormContent.Jobcname = userInfo[0].Position// 职称
                KStarForm.vmFormData.vmFormContent.Site = userInfo[0].compid// 公司
  
                if (userInfo[0].Costcentercode != "" && userInfo[0].Costcentercode != null) {
                    KStarForm.vmFormData.vmFormContent.CostCenter = userInfo[0].Costcentercode// 成本中心
                }
                if (userInfo[0].DeptName != "" && userInfo[0].DeptName != null) {
                    KStarForm.vmFormData.vmFormContent.Depcname = userInfo[0].DeptName// 部门
                }
  
                if ((userInfo[0].Costcentercode == "" || userInfo[0].Costcentercode == null) || userInfo[0].DeptName == "" || userInfo[0].DeptName == null) {
                    // 成本中心
                    axios.post(KStarForm.bpmBaseUrl + '/AppicationForPurchase/Common/GetBUCode?badge=' + userInfo[0].Badge).then(function (res) {
                        var costCenterInfo = eval(res.data.data)
                        if (costCenterInfo.length > 0) {
                            var compid = userInfo[0].compid;
                            if (compid) {
                                axios.post(KStarForm.bpmBaseUrl + '/AppicationForPurchase/Common/GetCodeToCName?cName=' + encodeURIComponent(compid)).then(function (res) {
                                    var array = eval(res.data.data)
                                    if (array.length > 0) {
                                        if (userInfo[0].Costcentercode == "" || userInfo[0].Costcentercode == null) {
                                            KStarForm.vmFormData.vmFormContent.CostCenter = array[0].Code + costCenterInfo[0].SAPCode// 成本中心
                                        }
                                    }
                                    else {
                                        if (userInfo[0].Costcentercode == "" || userInfo[0].Costcentercode == null) {
                                            KStarForm.vmFormData.vmFormContent.CostCenter = costCenterInfo[0].SAPCode// 成本中心
                                        }
                                    }
                                }).catch(function (error) {
                                    console.log(error);
                                });
                            }
                            else {
                                if (userInfo[0].Costcentercode == "" || userInfo[0].Costcentercode == null) {
                                    KStarForm.vmFormData.vmFormContent.CostCenter = costCenterInfo[0].SAPCode// 成本中心
                                }
                            }
                            if (userInfo[0].DeptName == "" || userInfo[0].DeptName == null) {
                                KStarForm.vmFormData.vmFormContent.Depcname = costCenterInfo[0].DepName// 部门
                            }
                        }
                        else {
                            if (userInfo[0].Costcentercode == "" || userInfo[0].Costcentercode == null) {
                                KStarForm.vmFormData.vmFormContent.CostCenter = ""// 成本中心
                                if (KStarForm.vmFormData.vmUserLanguages == "en") {
                                    var costCenterTip = "The cost center is empty, please maintain it in the background"
                                }
                                else {
                                    var costCenterTip = "成本中心为空，请在后台维护"
                                }
                                ElMessage({
                                    showClose: true,
                                    message: costCenterTip,
                                    type: 'error'
                                });
                            }
                            if (userInfo[0].DeptName == "" || userInfo[0].DeptName == null) {
                                KStarForm.vmFormData.vmFormContent.Depcname = ""// 部门
                                if (KStarForm.vmFormData.vmUserLanguages == "en") {
                                    var DeptNameTip = "The department is empty, please maintain it in the background"
                                }
                                else {
                                    var DeptNameTip = "部门为空，请在后台维护"
                                }
                                ElMessage({
                                    showClose: true,
                                    message: DeptNameTip,
                                    type: 'error'
                                });
                            }
  
                        }
                    }).catch(function (error) {
                        console.log(error);
                    });
                }
  
            }).catch(function (error) {
                console.log(error);
            });
        },
        getApplicantInformationOfUserAccount: function (val) {
            var userAccount = val;
            var _this = this
            axios.post(KStarForm.bpmBaseUrl + '/Speech/SpeechIndex/SearchUser?badge=' + userAccount).then(function (res) {
                var data = res.data.data;
                var userInfo = eval(data)
                KStarForm.vmFormData.vmFormContent.ApplicantBadge = userInfo[0].Badge// 工号
                KStarForm.vmFormData.vmFormContent.ApplicantAccount = userInfo[0].UserAccount// 工号
                KStarForm.vmFormData.vmFormContent.Applicant = userInfo[0].UserName// 申请人
                KStarForm.vmFormData.vmFormContent.Floor = userInfo[0].userfloor// 楼号
                KStarForm.vmFormData.vmFormContent.Room = userInfo[0].userroom// 房间号
                KStarForm.vmFormData.vmFormContent.GroupLeader = userInfo[0].groupleader// 直属领导
                KStarForm.vmFormData.vmFormContent.GroupLeaderBadge = userInfo[0].groupleaderBadge// 直属领导Badge
                KStarForm.vmFormData.vmFormContent.Jobcname = userInfo[0].Position// 职称
                KStarForm.vmFormData.vmFormContent.Site = userInfo[0].compid// 公司
  
                if (userInfo[0].Costcentercode != "" && userInfo[0].Costcentercode != null) {
                    KStarForm.vmFormData.vmFormContent.CostCenter = userInfo[0].Costcentercode// 成本中心
                }
                if (userInfo[0].DeptName != "" && userInfo[0].DeptName != null) {
                    //KStarForm.vmFormData.vmFormContent.Depcname = userInfo[0].DeptName// 部门
                    KStarForm.vmFormData.vmFormContent.Depcname = userInfo[0].DeptName// 部门
                }
  
                if ((userInfo[0].Costcentercode == "" || userInfo[0].Costcentercode == null) || userInfo[0].DeptName == "" || userInfo[0].DeptName == null) {
                    //成本中心
                    axios.post('/AppicationForPurchase/Common/GetBUCode?badge=' + userInfo[0].Badge + '&DepName=' + userInfo[0].DeptName + '').then(function (res) {
                        var costCenterInfo = eval(res.data.data)
                        if (costCenterInfo.length > 0) {
                            var compid = userInfo[0].compid;
                            if (compid) {
                                axios.post('/AppicationForPurchase/Common/GetCodeToCName?cName=' + encodeURIComponent(compid)).then(function (res) {
                                    var array = eval(res.data.data)
                                    if (array.length > 0) {
                                        if (userInfo[0].Costcentercode == "" || userInfo[0].Costcentercode == null) {
                                            KStarForm.vmFormData.vmFormContent.CostCenter = array[0].Code + costCenterInfo[0].SAPCode// 成本中心
                                        }
                                    }
                                    else {
                                        if (userInfo[0].Costcentercode == "" || userInfo[0].Costcentercode == null) {
                                            KStarForm.vmFormData.vmFormContent.CostCenter = costCenterInfo[0].SAPCode// 成本中心
                                        }
                                    }
                                }).catch(function (error) {
                                    console.log(error);
                                });
                            }
                            else {
                                if (userInfo[0].Costcentercode == "" || userInfo[0].Costcentercode == null) {
                                    KStarForm.vmFormData.vmFormContent.CostCenter = costCenterInfo[0].SAPCode// 成本中心
                                }
                            }
                            if (userInfo[0].DeptName == "" || userInfo[0].DeptName == null) {
                                KStarForm.vmFormData.vmFormContent.Depcname = costCenterInfo[0].DepName// 部门
                            }
                        }
                        else {
                            if (userInfo[0].Costcentercode == "" || userInfo[0].Costcentercode == null) {
                                KStarForm.vmFormData.vmFormContent.CostCenter = ""// 成本中心
                                if (KStarForm.vmFormData.vmUserLanguages == "en") {
                                    var costCenterTip = "The cost center is empty, please maintain it in the background"
                                }
                                else {
                                    var costCenterTip = "成本中心为空，请在后台维护"
                                }
                                _this.$message({
                                    showClose: true,
                                    message: costCenterTip,
                                    type: 'error'
                                });
                            }
                            if (userInfo[0].DeptName == "" || userInfo[0].DeptName == null) {
                                KStarForm.vmFormData.vmFormContent.Depcname = ""// 部门
                                if (KStarForm.vmFormData.vmUserLanguages == "en") {
                                    var DeptNameTip = "The department is empty, please maintain it in the background"
                                }
                                else {
                                    var DeptNameTip = "部门为空，请在后台维护"
                                }
                                _this.$message({
                                    showClose: true,
                                    message: DeptNameTip,
                                    type: 'error'
                                });
                            }
  
                        }
                    }).catch(function (error) {
                        console.log(error);
                    });
                }
            }).catch(function (err) {
                throw new Error(err);
            });
        },
        isAgentChange: function () {
            var _this = this;
            if (KStarForm.vmFormData.vmFormType == 'Application' || KStarForm.vmFormData.vmFormType == 'Draft' || KStarForm.vmFormData.vmFormType == 'ReApproval') {
                if (KStarForm.vmFormData.vmFormContent.ISAgent == '2') {
                    var userBadge = KStarForm.vmFormData.vmFormInstance.Badge
                    _this.getApplicantInformationOfBadge(userBadge);
                }
            }
  
            this.isAgentDisable = (KStarForm.vmFormData.vmFormContent.ISAgent == '1' ? false : true);
  
        },
        //打开工号
        SelectBadge: function () {
            //this.sort = val
            this.showdialog('UserBadge', false)
        },
        //打开弹窗
        showdialog: function (val, multiple) {
            this.parmdialog.clicktype = val;
            switch (val) {
                case 'UserBadge':
                    this.parmdialog.type = "User";
                    this.parmdialog.ctype = "UserPick";
                    this.parmdialog.title = "请选择账号";
                    break;
            }
            this.parmdialog.dialogvisible = true;
            this.parmdialog.multiplelimit = multiple;
            return false;
  
        },
        //关闭弹窗
        closedialog: function () {
            this.parmdialog.dialogvisible = false;
        },
        //人员选择后确定
        userpickCallBack: function (val, type) {
            var _this = this
            var userAccount = val[0].Value;
            _this.getApplicantInformationOfUserAccount(userAccount);
        },
        /*----------申请设备信息----------*/
        isShowReportSPASoftwareList: function (val) {
            var _this = this;
            if (KStarForm.vmFormData.vmFormContent.SoftwareType) {
                _this.SoftwareTypeSearchInput = KStarForm.vmFormData.vmFormContent.SoftwareType;
            }
            _this.dialogAssetNumberFlag = val;
            _this.getReportSPASoftwareList();
        },
        //获取软件清单List
        getReportSPASoftwareList: function () {
            var _this = this;
            var softwareType = _this.SoftwareTypeSearchInput;
            var softwareName = _this.SoftwareNameSearchInput;
            var site = KStarForm.vmFormData.vmFormContent.Site;
            var key = "";
            if (softwareType) {
                key += " And SoftwareType=N'" + softwareType + "'";
            }
            if (softwareName) {
                key += " And SoftwareName  LIKE N'*" + softwareName + "*'";
            }
            key += " And Site in (N'" + site + "',N'公共')";
            axios.post(KStarForm.bpmBaseUrl + '/SPASoftwareListReport/GetReportSPASoftwareList?key=' + encodeURIComponent(key)).then(function (res) {
                if (res.data.code == 200) {
                    var objArray = eval(res.data.data);
                    for (var i = 0; i < objArray.length; i++) {
                        objArray[i].SoftwareType = _this.dropDownNameOfCode(_this.softwareTypeArr, objArray[i].SoftwareType)
                    }
                    _this.currentPage = 1
                    _this.reportSoftwareLists = objArray;
                    _this.currentreportSoftwareList = [];
                    if (objArray.length > 0) {
                        _this.currentreportSoftwareList = _this.reportSoftwareLists.slice(0, _this.dialogPageSize);
                    }
                }
            });
        },
        //通过软件名称获取软件版本
        softwareDistinctVersion: function (val) {
            var softwareType = KStarForm.vmFormData.vmFormContent.SoftwareType
            var site = KStarForm.vmFormData.vmFormContent.Site;
            var key = "";
            key += " And SoftwareType=N'" + softwareType + "'";
            key += " And SoftwareName=N'" + val + "'";
            key += " And Site in (N'" + site + "',N'公共')";
            axios.get(KStarForm.bpmBaseUrl + '/SPASoftwareListReport/GetSoftwareVersionOfSoftwareName?key=' + encodeURIComponent(key)).then(function (res) {
                if (res.data.code == 200) {
                    KStarForm.vmFormData.vmFormContent.softwareVersionArr = eval(res.data.data);
                }
            });
        },
        //通过软件名称，软件版本获取获取软件清单数据
        softwareVersionMatch: function () {
            var _this = this;
            var softwareType = KStarForm.vmFormData.vmFormContent.SoftwareType
            var softwareName = KStarForm.vmFormData.vmFormContent.SoftwareName;
            var softwareVersion = KStarForm.vmFormData.vmFormContent.SoftwareVersion;
            var charge = KStarForm.vmFormData.vmFormContent.Charge;
            var deptName = KStarForm.vmFormData.vmFormContent.Depcname;
            var site = KStarForm.vmFormData.vmFormContent.Site;
            var key = "";
            key += " And SoftwareType=N'" + softwareType + "'";
            key += " And SoftwareName=N'" + softwareName + "'";
            key += " And SoftwareVersion=N'" + softwareVersion + "'";
            //key += " And Depcname in (N'" + deptName + "',N'公共')";
            key += " And Site in (N'" + site + "',N'公共')";
            axios.post(KStarForm.bpmBaseUrl + '/SPASoftwareListReport/GetReportSPASoftwareList?key=' + encodeURIComponent(key)).then(function (res) {
                if (res.data.code == 200) {
                    var objArray = eval(res.data.data);
                    if (objArray.length > 0) {
                        if (objArray[0].AttachmentFileId) {
                            var obj = {}
                            obj.NewFileName = objArray[0].LicenseAnnex
                            obj.FileId = objArray[0].AttachmentFileId
                            obj.DownloadUrl = objArray[0].AttachmentDownloadUrl
                            obj.UploadedDate = objArray[0].AttachmentUploadedDate
                            obj.Uploader = objArray[0].AttachmentUploader
                            if (KStarForm.vmFormData.vmFormContent.scoopel.length >= 1) {
                                KStarForm.vmFormData.vmFormContent.scoopel.splice(0, 1, obj);
                            }
                            else {
                                KStarForm.vmFormData.vmFormContent.scoopel.push(obj);
                            }
                        }
                        KStarForm.vmFormData.vmFormContent.LicenseKey = objArray[0].LicenseKey //许可证
                        KStarForm.vmFormData.vmFormContent.License = objArray[0].License//许可证号
                        KStarForm.vmFormData.vmFormContent.LicenseAnnex = objArray[0].LicenseAnnex//许可证附件
                        KStarForm.vmFormData.vmFormContent.AttachmentFileId = objArray[0].AttachmentFileId//附件ID
                        KStarForm.vmFormData.vmFormContent.AttachmentDownloadUrl = objArray[0].AttachmentDownloadUrl//附件URL
                        KStarForm.vmFormData.vmFormContent.AttachmentUploadedDate = objArray[0].AttachmentUploadedDate//附件上传时间
                        KStarForm.vmFormData.vmFormContent.AttachmentUploader = objArray[0].AttachmentUploader//附件上传者
                        KStarForm.vmFormData.vmFormContent.DetailSPASoftwareListID = objArray[0].Id//清单报表ID
                        KStarForm.vmFormData.vmFormContent.InstallationPackage = objArray[0].InstallationPackage// 是否有安装包
                        KStarForm.vmFormData.vmFormContent.OriginalSoftwareManufacturer = objArray[0].OriginalSoftwareManufacturer// 软件原厂商
                        KStarForm.vmFormData.vmFormContent.Charge = objArray[0].Charge // 是否收费SoftwareType
                        KStarForm.vmFormData.vmFormContent.Availability = objArray[0].Availability //软件有效性
                        if (KStarForm.vmFormData.vmFormType == 'Application' || KStarForm.vmFormData.vmFormType == 'Draft' || KStarForm.vmFormData.vmFormType == 'ReApproval') {
                            if (softwareType == "2" || (softwareType == "3" && charge == "1")) {
                                //判断License配额是否存足   [FreeQuotas] + [RemainingAvailableQuotas]
                                if ((parseInt(objArray[0].RemainingAvailableQuotas) + parseInt(objArray[0].FreeQuotas)) <= 0) {
                                    debugger
                                    KStarForm.vmFormData.vmFormContent.IsEnoughLicence = false;
                                    _this.$message(
                                        {
                                            showClose: true,
                                            message: _this.$tf('event.AttentionTip'),
                                            type: 'error'
                                        });
                                }
                                else {
                                    KStarForm.vmFormData.vmFormContent.IsEnoughLicence = true;
                                }
                            }
  
                        }
                    }
                }
            });
        },
        //软件版本改变事件
        softwareVersionChange: function () {
            var _this = this;
            if (KStarForm.vmFormData.vmFormType == 'Application' || KStarForm.vmFormData.vmFormType == 'Draft' || KStarForm.vmFormData.vmFormType == 'ReApproval') {
                if (KStarForm.vmFormData.vmUserLanguages == "en") {
                    var SoftwareNameTip = "The software name cannot be empty"
                    var SoftwareVersionTip = "The software version cannot be empty"
                    var SoftwareNameOfOtherTip = "The software name cannot be other"
                }
                else {
  
                    var SoftwareNameTip = "软件名称不能为空"
                    var SoftwareVersionTip = "软件版本不能为空"
                    var SoftwareNameOfOtherTip = "软件名称不能为其他"
                }
                if (!KStarForm.vmFormData.vmFormContent.SoftwareName) { _this.$message({ showClose: true, message: SoftwareNameTip, type: 'error' }); return false }
                else {
                    if (KStarForm.vmFormData.vmFormContent.SoftwareName == "其他" && KStarForm.vmFormData.vmFormContent.SoftwareType == "3") {
                        _this.$message({ showClose: true, message: SoftwareNameOfOtherTip, type: 'error' }); return false
                    }
                }
                if (!KStarForm.vmFormData.vmFormContent.SoftwareVersion) { _this.$message({ showClose: true, message: SoftwareVersionTip, type: 'error' }); return false }
                var obj = {}
                obj.SoftwareType = KStarForm.vmFormData.vmFormContent.SoftwareType
                obj.SoftwareName = KStarForm.vmFormData.vmFormContent.SoftwareName
                obj.SoftwareVersion = KStarForm.vmFormData.vmFormContent.SoftwareVersion
                var flag;
                $.ajax({
                    type: 'post',
                    async: false,
                    url: KStarForm.bpmBaseUrl + "/AppicationForPurchase/SPASoftwareListReport/IsHaveQuotas",
                    data: { model: obj },
                    dataType: 'text',
                    success: function (data) {
                        flag = data;
                    }
                });
                if (flag == "False") {
                    _this.$message(
                        {
                            showClose: true,
                            message: _this.$tf('event.AttentionTip'),
                            type: 'error'
                        });
                }
            }
        },
        //判断预算号是否为18位
        validateNumOfBudgetNumber: function (val) {
            if (KStarForm.vmFormData.vmUserLanguages == "en") {
                var BudgetNumberTip = "Please fill in the Budget Number correctly"
            }
            else {
                var BudgetNumberTip = "请填写正确的预算号"
            }
            var _this = this
            if (!/^\d{18}$/.test(val)) {
                _this.$message({
                    showClose: true,
                    message: BudgetNumberTip,
                    type: 'error'
                });
            }
        },
        //软件类型Change事件
        softwareTypeChange: function (val) {
            var _this = this
            KStarForm.vmFormData.vmFormContent.IsEnoughLicence == false;
            KStarForm.vmFormData.vmFormContent.scoopel = [];
            KStarForm.vmFormData.vmFormContent.LicenseKey = "" //许可证
            KStarForm.vmFormData.vmFormContent.License = ""//许可证号
            KStarForm.vmFormData.vmFormContent.LicenseAnnex = ""//许可证附件
            KStarForm.vmFormData.vmFormContent.AttachmentFileId = ""//附件ID
            KStarForm.vmFormData.vmFormContent.AttachmentDownloadUrl = ""//附件URL
            KStarForm.vmFormData.vmFormContent.AttachmentUploadedDate = ""//附件上传时间
            KStarForm.vmFormData.vmFormContent.AttachmentUploader = ""//附件上传者
            KStarForm.vmFormData.vmFormContent.DetailSPASoftwareListID = ""//清单报表ID
            KStarForm.vmFormData.vmFormContent.InstallationPackage = ""// 是否有安装包
            KStarForm.vmFormData.vmFormContent.OriginalSoftwareManufacturer = ""// 软件原厂商
            KStarForm.vmFormData.vmFormContent.Charge = "" // 是否收费SoftwareType
            KStarForm.vmFormData.vmFormContent.Availability = "" //软件有效性
            KStarForm.vmFormData.vmFormContent.SoftwareName = "" //软件名称
            KStarForm.vmFormData.vmFormContent.SoftwareVersion = "" //软件版本
            KStarForm.vmFormData.vmFormContent.softwareVersionArr = "";
            _this.currentreportSoftwareList = [];
            _this.SoftwareTypeSearchInput = val;
            if (val == 3) {
                KStarForm.vmFormData.vmFormContent.SoftwareName = "其他" //软件名称
                KStarForm.vmFormData.vmFormContent.isSoftwareVersionHidden = true //软件版本输入框
            }
            else {
                KStarForm.vmFormData.vmFormContent.isSoftwareVersionHidden = false //软件版本输入框
            }
        },
        // 弹框搜索按钮
        reportSPASoftwareListSearchBtn: function () {
            var _this = this;
            _this.getReportSPASoftwareList()
        },
        // 弹框_软件名称分页页码切换
        reportSPASoftwareListSizeChange: function (val) {
            this.currentPage = val
            this.currentreportSoftwareList = this.reportSoftwareLists.slice((val - 1) * this.dialogPageSize, val * this.dialogPageSize)
        },
        // 弹框_软件名称暂存选择软件数据
        checkedTemporary: function (val) {
            this.temporaryChecked = val
        },
        // 弹框_软件名称确定软件数据
        checkedReportSPASoftwareListEvent: function () {
            var _this = this
            if (!_this.temporaryChecked || !_this.temporaryChecked.hasOwnProperty('SoftwareName')) {
                _this.$message.error($tf('Form.selectReportSPASoftwareList'));
                return false;
            }
            _this.dialogAssetNumberFlag = false
            _this.temporaryChecked.SoftwareType = _this.dropDownCodeOfName(_this.softwareTypeArr, _this.temporaryChecked.SoftwareType)
            KStarForm.vmFormData.vmFormContent.SoftwareType = _this.temporaryChecked.SoftwareType  //软件类型
            KStarForm.vmFormData.vmFormContent.SoftwareName = _this.temporaryChecked.SoftwareName //软件名称
            _this.softwareDistinctVersion(_this.temporaryChecked.SoftwareName);//获取软件版本下拉
            KStarForm.vmFormData.vmFormContent.isSoftwareVersionHidden = false //软件版本输入框
  
            KStarForm.vmFormData.vmFormContent.scoopel = [];
            KStarForm.vmFormData.vmFormContent.SoftwareVersion = "" //软件版本
            KStarForm.vmFormData.vmFormContent.LicenseKey = "" //许可证
            KStarForm.vmFormData.vmFormContent.License = ""//许可证号
            KStarForm.vmFormData.vmFormContent.LicenseAnnex = ""//许可证附件
            KStarForm.vmFormData.vmFormContent.AttachmentFileId = ""//附件ID
            KStarForm.vmFormData.vmFormContent.AttachmentDownloadUrl = ""//附件URL
            KStarForm.vmFormData.vmFormContent.AttachmentUploadedDate = ""//附件上传时间
            KStarForm.vmFormData.vmFormContent.AttachmentUploader = ""//附件上传者
            KStarForm.vmFormData.vmFormContent.DetailSPASoftwareListID = ""//清单报表ID
            KStarForm.vmFormData.vmFormContent.InstallationPackage = ""// 是否有安装包
            KStarForm.vmFormData.vmFormContent.OriginalSoftwareManufacturer = ""// 软件原厂商
            KStarForm.vmFormData.vmFormContent.Charge = "" // 是否收费SoftwareType
            KStarForm.vmFormData.vmFormContent.Availability = "" //软件有效性
        },
        /*----------部门采购信息----------*/
        //证件号附件
        useStampInfosUpload: function () {
            this.$refs.stempUpload.click()
        },
        beforeupload: function (file) {
            var _this = this
            _this.loading = true
            debugger
            var fd = new FormData();
            var procssGuid = "SoftwarePurchaseApplication_Index";
            fd.append("file", file);
  
            axios.post("/purchase/attachment/SaveAttachments?AttachmentGuid=" + procssGuid, fd, {
                headers: {
                    'Content-Type': 'multipart/form-data'
                }
            }).then(function (res) {
                KStarForm.vmFormData.vmFormContent.LicenseAnnex = res.data.data.FileName//许可证附件
                KStarForm.vmFormData.vmFormContent.AttachmentFileId = res.data.data.FileGuid//附件ID
                KStarForm.vmFormData.vmFormContent.AttachmentDownloadUrl = res.data.data.FileURL//附件URL
                KStarForm.vmFormData.vmFormContent.AttachmentUploadedDate = res.data.data.UploadDate//附件上传时间
                KStarForm.vmFormData.vmFormContent.AttachmentUploader = res.data.data.OperatorAd//附件上传者
                var obj = {}
                obj.NewFileName = res.data.data.FileName
                obj.FileId = res.data.data.FileGuid
                obj.DownloadUrl = res.data.data.FileURL
                obj.UploadedDate = res.data.data.UploadDate
                obj.Uploader = res.data.data.OperatorAd
                if (obj.Uploader != null) {
                    var arr = []       //记录已上传附件名称
                    for (var i = 0; i < KStarForm.vmFormData.vmFormContent.scoopel.length; i++) {
                        arr.push(KStarForm.vmFormData.vmFormContent.scoopel[i].NewFileName)
                    }
                    if (arr.indexOf(obj.NewFileName) != -1) {
                        if (KStarForm.vmFormData.vmUserLanguages == "en") {
                            _this.$message.error('This file has been uploaded and do not upload attachments with the same document name repeatedly');
                        } else {
                            _this.$message.error('此文件已经上传，请勿重复上传同样文档名的附件');
                        }
                    } else {
                        KStarForm.vmFormData.vmFormContent.scoopel.push(obj);
                        if (KStarForm.vmFormData.vmUserLanguages == "en") {
                            _this.$message({
                                message: 'File Upload Successfully',
                                type: 'success'
                            });
                        } else {
                            _this.$message({
                                message: '文件上传成功',
                                type: 'success'
                            });
                        }
                    }
                } else {
                    if (KStarForm.vmFormData.vmUserLanguages == "en") {
                        _this.$message.error('File Upload Failed');
                    } else {
                        _this.$message.error('文件上传失败');
                    }
                }
                _this.loading = false
            });
        },
        seefile: function (val) {
            var road = val.row.DownloadUrl
            var filename = road.split('\\')[4]
            if (road.indexOf("KStarPublish") != -1) {
                var filed = road.split('KStar.Form.Web');
                console.log(filed[0], filed[1])
                var href = window.location.origin
                road = href + filed[1]
  
            }
  
            if (this.isiphone == false) {
  
                //road = 'http://140.206.58.42:9088/ImportExcelFile/' + filename
                road = '../../ImportExcelFile/' + filename
  
            }
            window.open(road)
        },
        deleteRowFile: function (index, file, val, rows) {
            KStarForm.vmFormData.vmFormContent.scoopel.splice(index, 1)
        },
        /*----------软件清单记录报表----------*/
        //license配额焦点事件
        licenseQuotasBlur: function (val) {
            var index = val.$index
            KStarForm.vmFormData.vmFormContent.reportSPASoftwareLists[index].RemainingAvailableQuotas = val.row.LicenseQuotas
        },
        //软件清单记录新增
        detailSPASoftwareListsAdd: function () {
            this.AddType();
        },
        //删除软件清单数据
        deleteDetailSPASoftwareListsRow: function (index, rows) {
            var _this = this
            _this.$confirm(_this.$tf('dialog.delete'), _this.$tf('dialog.reminder'), {
                confirmButtonText: _this.$tf('dialog.confirm'),
                cancelButtonText: _this.$tf('dialog.cancel1'),
                type: "warning"
            }).then(function () {
                rows.splice(index, 1);
                _this.$message({
                    type: "success",
                    message: _this.$tf('dialog.deleteed')
                });
            }).catch(function () {
                _this.$message({
                    type: "info",
                    message: _this.$tf('dialog.nodelete')
                });
            });
  
        },
        //许可证附件上传
        licenseAnnexUpload: function (val) {
            //this.upFile = val.$index
            if (val.row.AttachmentDownloadUrl != "" && val.row.AttachmentDownloadUrl != null) {
                this.openssss(val)
            } else {
                this.$refs.stempUploadofLicenseAnnex.click()
            }
        },
        beforeuploadofLicenseAnnex: function (file) {
            var _this = this
            var fd = new FormData();
            fd.append("file", file);
            var procssGuid = "ReportSPASoftwareList_Index_Detail"
            axios.post("/purchase/attachment/SaveAttachments?AttachmentGuid=" + procssGuid, fd, {
                headers: {
                    'Content-Type': 'multipart/form-data'
                }
            }).then(function (res) {
                if (res.data.data.OperatorAd != null) {
                    if (KStarForm.vmFormData.vmFormContent.reportSPASoftwareLists.length > 0) {
                        KStarForm.vmFormData.vmFormContent.reportSPASoftwareLists[0].LicenseAnnex = res.data.data.FileName
                        KStarForm.vmFormData.vmFormContent.reportSPASoftwareLists[0].AttachmentFileId = res.data.data.FileGuid
                        KStarForm.vmFormData.vmFormContent.reportSPASoftwareLists[0].AttachmentDownloadUrl = res.data.data.FileURL
                        KStarForm.vmFormData.vmFormContent.reportSPASoftwareLists[0].AttachmentUploadedDate = res.data.data.UploadDate
                        KStarForm.vmFormData.vmFormContent.reportSPASoftwareLists[0].AttachmentUploader = res.data.data.OperatorAd
                    }
                    else {
                        _this.file_Temp.LicenseAnnex = res.data.data.FileName
                        _this.file_Temp.AttachmentFileId = res.data.data.FileGuid
                        _this.file_Temp.AttachmentDownloadUrl = res.data.data.FileURL
                        _this.file_Temp.AttachmentUploadedDate = res.data.data.UploadDate
                        _this.file_Temp.AttachmentUploader = res.data.data.OperatorAd
                    }
                    if (KStarForm.vmFormData.vmUserLanguages == "en") {
                        _this.$message({
                            message: 'File Upload Successfully',
                            type: 'success'
                        });
                    } else {
                        _this.$message({
                            message: '文件上传成功',
                            type: 'success'
                        });
                    }
                } else {
                    if (KStarForm.vmFormData.vmUserLanguages == "en") {
                        _this.$message.error('File Upload Failed');
                    } else {
                        _this.$message.error('文件上传失败');
                    }
                }
            });
  
        },
        //查看附件
        seeLicenseAnnexfile: function (val) {
            var _this = this
            var road = val.row.AttachmentDownloadUrl
            if (road == "" || road == null) {
                _this.$message({
                    type: 'info',
                    message: _this.$tf('Form.dialog.file')
                });
                return false
            }
            window.open(val.row.AttachmentDownloadUrl)
        },
        openssss: function (val) {
            var _this = this
            this.$confirm(_this.$tf('Form.oldupload'), _this.$tf('dialog.reminder'), {
                confirmButtonText: _this.$tf('dialog.confirm'),
                cancelButtonText: _this.$tf('dialog.cancel1'),
                type: 'warning'
            }).then(function () {
                //val.row.AttachmentDownloadUrl = ''
                this.$refs.stempUploadofLicenseAnnex.click()
            }).catch(function () {
                _this.$message({
                    type: 'info',
                    message: _this.$tf('Form.upload')
                });
            });
        },
        //弹框_软件清单记录报表_取消
        cancel: function () {
            this.editT = false
        },
        //弹框_软件清单记录报表_确认
        changeIn: function () {
            var _this = this
            console.log(_this.form);
            if (_this.langu == "en") {
                var SiteTip = "The company cannot be empty"
                var DepcnameTip = "The department cannot be empty"
                var SoftwareTypeTip = "The software type cannot be empty"
                var SoftwareNameTip = "The software name cannot be empty"
                var SoftwareVersionTip = "The software version cannot be empty"
                var InstallationPackageTip = "Whether there is an installation package cannot be empty"
                var ChargeTip = "Whether the charge cannot be empty"
                var LicenseQuotasTip = "The License quota cannot be empty"
                var PurchaseTimeTip = "The software purchase time cannot be empty"
                var ExpireDateTip = "The expiration time cannot be empty"
                var AvailabilityTip = "Software validity cannot be empty"
                var DisableTip = "Whether to disable"
            }
            else {
                var SiteTip = "公司不能为空"
                var DepcnameTip = "部门不能为空"
                var SoftwareTypeTip = "软件类型不能为空"
                var SoftwareNameTip = "软件名称不能为空"
                var SoftwareVersionTip = "软件版本不能为空"
                var InstallationPackageTip = "是否有安装包不能为空"
                var ChargeTip = "是否收费不能为空"
                var LicenseQuotasTip = "License配额不能为空"
                var PurchaseTimeTip = "软件采购时间不能为空"
                var ExpireDateTip = "到期时间不能为空"
                var AvailabilityTip = "软件有效性不能为空"
                var DisableTip = "是否禁用"
  
            }
            if (!_this.form.Site) {
                _this.$message({
                    showClose: true,
                    message: SiteTip,
                    type: 'error'
                });
            }
            if (!_this.form.Depcname) {
                _this.$message({
                    showClose: true,
                    message: DepcnameTip,
                    type: 'error'
                });
            }
            if (!_this.form.SoftwareType) {
                _this.$message({
                    showClose: true,
                    message: SoftwareTypeTip,
                    type: 'error'
                });
            }
            if (!_this.form.SoftwareName) {
                _this.$message({
                    showClose: true,
                    message: SoftwareNameTip,
                    type: 'error'
                });
                return false
            }
            if (!_this.form.SoftwareVersion) {
                _this.$message({
                    showClose: true,
                    message: SoftwareVersionTip,
                    type: 'error'
                });
                return false
            }
            if (!_this.form.InstallationPackage) {
                _this.$message({
                    showClose: true,
                    message: InstallationPackageTip,
                    type: 'error'
                });
                return false
            }
            if (!_this.form.Charge) {
                _this.$message({
                    showClose: true,
                    message: ChargeTip,
                    type: 'error'
                });
                return false
            }
            if (!_this.form.LicenseQuotas) {
                _this.$message({ showClose: true, message: LicenseQuotasTip, type: 'error' }); return false
            }
            if (!_this.form.PurchaseTime) {
                _this.$message({ showClose: true, message: PurchaseTimeTip, type: 'error' }); return false
            }
            if (!_this.form.ExpireDate) {
                _this.$message({ showClose: true, message: ExpireDateTip, type: 'error' }); return false
            }
            if (!_this.form.Availability) {
                _this.$message({ showClose: true, message: AvailabilityTip, type: 'error' }); return false
            }
            if (!_this.form.Disable) {
                _this.$message({ showClose: true, message: DisableTip, type: 'error' }); return false
            }
            var obj = _this.form
            var file_Temp = _this.file_Temp
            KStarForm.vmFormData.vmFormContent.reportSPASoftwareLists.push({
                Site: obj.Site,
                Depcname: obj.Depcname,
                SoftwareType: obj.SoftwareType,
                SoftwareName: obj.SoftwareName,
                SoftwareVersion: obj.SoftwareVersion,
                OriginalSoftwareManufacturer: obj.OriginalSoftwareManufacturer,
                InstallationPackage: obj.InstallationPackage,
                Charge: obj.Charge,
                LicenseQuotas: obj.LicenseQuotas,
                FreeQuotas: obj.FreeQuotas,
                UsedQuotas: obj.UsedQuotas,
                RemainingAvailableQuotas: obj.RemainingAvailableQuotas,
                PurchaseTime: obj.PurchaseTime,
                ExpireDate: obj.ExpireDate,
                Availability: obj.Availability,
                LicenseKey: obj.LicenseKey,
                License: obj.License,
                LicenseAnnex: file_Temp.LicenseAnnex,
                AttachmentFileId: file_Temp.AttachmentFileId,
                AttachmentDownloadUrl: file_Temp.AttachmentDownloadUrl,
                AttachmentUploadedDate: file_Temp.AttachmentUploadedDate,
                AttachmentUploader: file_Temp.AttachmentUploader,
                Comments: obj.Comments,
            })
            _this.editT = false
        },
        //弹框_软件清单记录报表_是否收费Change事件
        chargeChange: function (val) {
            var _this = this
            if (val == 1) {
                _this.form.Site = "";
                _this.form.Depcname = "";
            }
            else if (val == 2) {
                _this.form.Site = "公共";
                _this.form.Depcname = "公共";
            }
            if (_this.form.SoftwareType == "3" && val == "1") {
                var date = new Date();
                _this.form.PurchaseTime = new Date();
                _this.form.ExpireDate = moment(date.setFullYear(date.getFullYear() + 10)).format('YYYY-MM-DD');
            }
            else {
                var date = new Date();
                _this.form.PurchaseTime = new Date();
                _this.form.ExpireDate = moment(date.setFullYear(date.getFullYear() + 10)).format('YYYY-MM-DD');
            }
        },
        //弹框_软件清单记录报表_编辑
        handleClick: function (val) {
            var _this = this;
            val.SoftwareType = _this.dropDownCodeOfName(_this.softwareTypeArr, val.SoftwareType)
            val.InstallationPackage = _this.dropDownCodeOfName(_this.whetherArr, val.InstallationPackage)
            val.Charge = _this.dropDownCodeOfName(_this.whetherArr, val.Charge)
            val.Availability = _this.dropDownCodeOfName(_this.availabilityArr, val.Availability)
            val.Disable = _this.dropDownCodeOfName(_this.whetherArr, val.Disable)
            this.scope_Edit = val;
            this.DioTitle = "编辑信息"
            this.form = JSON.parse(JSON.stringify(val))
            this.form1 = JSON.parse(JSON.stringify(val))
            this.editT = true
            this.isEd = true
        },
        //弹框_软件清单记录报表_添加
        AddType: function () {
            this.form.Site = "",
                this.form.Depcname = "",
                this.form.SoftwareType = "",
                this.form.SoftwareName = "",
                this.form.SoftwareVersion = "",
                this.form.OriginalSoftwareManufacturer = "",
                this.form.InstallationPackage = "",
                this.form.Charge = "",
                this.form.LicenseQuotas = "",
                this.form.FreeQuotas = "0",
                this.form.UsedQuotas = "0",
                this.form.RemainingAvailableQuotas = "",
                this.form.PurchaseTime = "",
                this.form.ExpireDate = "",
                this.form.Availability = "",
                this.form.LicenseKey = "",
                this.form.License = "",
                this.form.LicenseAnnex = "",
                this.form.AttachmentFileId = "",
                this.form.AttachmentDownloadUrl = "",
                this.form.AttachmentUploadedDate = "",
                this.form.AttachmentUploader = "",
                this.form.Disable = "",
                this.form.Comments = "",
                this.form.ID = "",
                this.form.Availability = "1",
                this.form.Disable = "2",
                this.DioTitle = "新增信息"
            this.editT = true
            this.isEd = false
        },
        //弹框_软件清单记录报表_采购时间Change事件
        purchaseTimeChange: function (val) {
            var _this = this;
            var date = new Date();
            var expireDate = _this.form.ExpireDate
            if (!expireDate) {
                if (val > date) {
                    _this.$message({
                        showClose: true,
                        message: _this.$tf('event.purchaseTimeChangeTip'),
                        type: 'error'
                    });
                    _this.form.PurchaseTime = "";
                    return false
                }
            }
            else {
                if (val > expireDate) {
                    _this.$message({
                        showClose: true,
                        message: _this.$tf('event.purchaseTimeChange1Tip'),
                        type: 'error'
                    });
                    _this.form.PurchaseTime = "";
                    return false
                }
            }
  
        },
        //弹框_软件清单记录报表_到期时间Change事件
        expireDateChange: function (val) {
            var _this = this;
            var date = new Date();
            var purchaseTime = _this.form.PurchaseTime
            if (val < purchaseTime) {
                _this.$message({
                    showClose: true,
                    message: _this.$tf('event.expireDateChangeTip'),
                    type: 'error'
                });
                _this.form.ExpireDate = "";
                return false
            }
            if (val > date) {
                _this.form.Availability = "1";
            }
            else {
                _this.form.Availability = "2";
            }
        },
        //弹框_软件清单记录报表_公司Change事件
        siteChange: function (val) {
            var _this = this
            _this.form.Depcname = "";
        },
        //弹框_软件清单记录报表_软件类型Change事件
        softwareTypeChangeOfBox: function (val) {
            var _this = this
            if (val == "1") {
                _this.form.Site = "公共";
                _this.form.Depcname = "公共";
                _this.form.Charge = "2";
  
            }
            else if (val == "2") {
                if (_this.form.Site == "公共") {
                    _this.form.Site = "";
                }
                if (_this.form.Depcname == "公共") {
                    _this.form.Depcname = "";
                }
                _this.form.Charge = "1";
            }
            else if (val == "3") {
                if (_this.form.Site == "公共") {
                    _this.form.Site = "";
                }
                if (_this.form.Depcname == "公共") {
                    _this.form.Depcname = "";
                }
                _this.form.Charge = "1";
            }
            if (val == "3" && _this.form.Charge == "1") {
                var date = new Date();
                _this.form.PurchaseTime = new Date();
                _this.form.ExpireDate = moment(date.setFullYear(date.getFullYear() + 10)).format('YYYY-MM-DD');
            }
            else {
                var date = new Date();
                _this.form.PurchaseTime = new Date();
                _this.form.ExpireDate = moment(date.setFullYear(date.getFullYear() + 10)).format('YYYY-MM-DD');
            }
        },
        //弹框_软件清单记录报表_配额总数量焦点事件
        licenseQuotasBlur: function (val) {
            var _this = this;
            _this.form.RemainingAvailableQuotas = val;
        },
        //弹框_软件清单记录报表_许可证附件上传
        licenseAnnexUploadOfBox: function (val) {
            if (val.AttachmentDownloadUrl != "" && val.AttachmentDownloadUrl != null) {
                this.openssss(val)
            } else {
                this.$refs.stempUploadofLicenseAnnex.click()
            }
        },
        //弹框_软件清单记录报表_查看附件
        seefileOfBox: function (val) {
            var _this = this
            var road = val.AttachmentDownloadUrl
            if (road == "" || road == null) {
                _this.$message({
                    type: 'info',
                    message: _this.$tf('dialog.file')
                });
                return false
            }
            window.open(road)
        },
        /*----------Common----------*/
        //获取下拉框的值
        dropDownNameOfCode: function (array, code) {
            var _this = this
            var objArray = (array)
            for (var i = 0; i < objArray.length; i++) {
                if (objArray[i].Code == code) {
                    return _this.langu == 'cn' ? objArray[i].Name : objArray[i].EName
                }
            }
        },
        //通过Name获取下拉框的Code
        dropDownCodeOfName: function (array, name) {
            var _this = this
            var objArray = (array)
            for (var i = 0; i < objArray.length; i++) {
                var getValue = _this.langu == 'cn' ? objArray[i].Name : objArray[i].EName
                if (getValue == name) {
                    return objArray[i].Code
                }
            }
        },
    },
    setup() {
        let formData = reactive(KStarForm.vmFormData)
  
  
        var bpmform = ref(null)
        KStarForm.vmFormData = formData;
        const { proxy, ctx } = getCurrentInstance()
  
        var FormContentModel = {
            NextActivityID: "",// 下一节点
            NextApprover: "",// 下一节点审批人
            Folio: "", // 单号
            ProcessGuid: "", // 流程ID,
            //CreateTime: "",// 创建时间
            //RecordStatus: "0", // 记录是否有效
            //ApproverStatus: "",// 审批状态
            //FormId: "",
  
            Delegation: "",// 代理人
            DelegationPosition: "", // 代理人岗位
            DelegationDepartment: "",// 代理人部门
            ApplyDate: "",// 申请日期
            Submitter: "",// 填单人
            ProcessNo: "",// 流程单号
            ISAgent: '2',// 是否代理
            ApplicantBadge: "",// 工号
            ApplicantAccount: "",//申请人账号
            Applicant: "",// 申请人
            Floor: "", // 楼号
            Room: "",// 房间号
            GroupLeader: "", // 直属领导
            GroupLeaderBadge: "", // 直属领导Badge
            Jobcname: "",// 职称
            Depcname: "",// 部门
            Site: "",// 公司
            CostCenter: "", // 成本中心
            InstallComputerType: "",// 安装电脑类型
            SoftwareType: "", // 软件类型
            SoftwareName: "",// 软件名称
            SoftwareVersion: "",// 软件版本
            LicenseKey: "", //许可证
            License: "",//许可证号
            LicenseAnnex: "",//许可证附件
            AttachmentFileId: "",//附件ID
            AttachmentDownloadUrl: "",//附件URL
            AttachmentUploadedDate: "",//附件上传时间
            AttachmentUploader: "",//附件上传者
            DetailSPASoftwareListID: "",//清单报表ID
            InstallationPackage: "",// 是否有安装包
            ComputerName: "",// 计算机名
            Quantity: "1",// 申请数量
            OriginalSoftwareManufacturer: "",// 软件原厂商
            Charge: "", // 是否收费
            BudgetNumber: "",// 预算号
            Attention: "",// 提示
            ReasonForApplication: "",// 申请原因
            Notes: "",// 申请原因
            reportSPASoftwareLists: [],//软件清单表
            scoopel: [],// 附件
  
            //前端用：
            isSoftwareVersionHidden: false,
            softwareVersionArr: [],
            Availability: "",//有效性
            DetailSPASoftwareListIDOld: "",//清单报表IDold
            IsEnoughLicence: false,//配额是否存足
        }
  
        window.FormContentModel = FormContentModel;
  
        var FormLang = {
            cn: {
                Form: {
                    Depcnames: "部门",
                    //提示
                    selectReportSPASoftwareList: "请选择当前需要软件名称",
                    oldupload: "本次上传将会替换掉以前的文件",
                    upload: "已取消上传",
  
                    ProcessName: "软件使用申请",
                    ApplicantInformation: "申请人信息",
                    RequestEquipmentInformation: "申请设备信息",
                    DetailSPASoftwareLists: "软件清单记录报表",
                    ReportSPASoftwareLists: "部门采购信息",
                    TheNameOfTheSoftware: "软件名称",
                    Yes: "是",
                    No: "否",
                    IDX: "序号",
                    operating: "操作",
                    Cancel: "取消",
                    Determine: "确定",
                    Select: "选择",
                    Search: "搜索",
  
                    //Mster
                    Delegation: "代理人",
                    DelegationPosition: "代理人岗位",
                    DelegationDepartment: "代理人部门",
                    ApplyDate: "申请日期",
                    Submitter: "填单人",
                    ProcessNo: "流程单号",
                    ISAgent: "是否代理",
                    ApplicantBadge: "工号",
                    Applicant: "申请人",
                    Floor: " 楼层号",
                    Room: "房间号",
                    GroupLeader: "直属领导",
                    Jobcname: "职称",
                    Depcname: "部门",
                    Site: "公司",
                    CostCenter: "成本中心",
                    InstallComputerType: "安装电脑类型",
                    SoftwareType: "软件类型",
                    SoftwareName: "软件名称",
                    SoftwareVersion: "软件版本",
                    InstallationPackage: "是否有安装包",
                    ComputerName: "计算机名",
                    Quantity: "申请数量",
                    OriginalSoftwareManufacturer: "软件原厂商",
                    Charge: "是否收费",
                    BudgetNumber: "预算号",
                    Attention: "提示",
                    ReasonForApplication: "申请原因（需具体说明，避免仅填写”工作需要“等模糊描述）",
                    //Notes: "需具体说明，避免仅填写”工作需要“等模糊描述",
  
  
  
                    //Detail
                    Depcname: "部门",
                    SoftwareType: "软件类型",
                    SoftwareName: "软件名称",
                    SoftwareVersion: "软件版本",
                    OriginalSoftwareManufacturer: "软件原厂商",
                    InstallationPackage: "是否有安装包",
                    Charge: "是否收费",
                    LicenseQuotas: "License配额",
                    FreeQuotas: "冻结License配额",
                    UsedQuotas: "已用License配额",
                    RemainingAvailableQuotas: "剩余配额数",
                    PurchaseTime: "软件采购时间",
                    ExpireDate: "到期时间",
                    Availability: "软件有效性",
                    LicenseKey: "许可证号",
                    License: "许可证书",
                    LicenseAnnex: "许可证书附件",
                    Comments: "备注",
  
  
                    AttachmentName: "附件名称",
                    UploadTime: "上传时间",
                    Uploader: "上传人",
                    Attachment: "上传附件",
                    Attachment1: "申请人用印文件上传",
                    deleteFile: "删除",
                    Principal: "负责人",
                    dialog: {
                        confirm: '确定',
                        cancel1: '取消',
                        reminder: '提示',
                        delete: '此操作将删除该行数据, 是否继续?',
                        deleteed: '删除成功!',
                        file: "本次未上传许可证附件"
                    },
  
                },
                table: {
                    Search: '搜索',
                    Clear: '清除',
                    Add: '新增',
                    Delete: '删除',
                    TemplateDownload: '模板下载',
                    Import: '导入',
                    Export: '导出',
                    IDX: "序号",
                    Operating: "操作",
                    Edit: "编辑",
                    Enable: "启用",
                    Disable1: "禁用",
                    View: "查看",
                    Upload: "上传",
  
  
                    cancel: "取 消",
                    confirm: "确 认",
  
                    informationAssignment: "信息分配",
                    Distribution: "分配",
  
                    Site: "公司",
                    Depcname: "部门",
                    SoftwareType: "软件类型",
                    SoftwareName: "软件名称",
                    SoftwareVersion: "软件版本",
                    OriginalSoftwareManufacturer: "软件原厂商",
                    InstallationPackage: "是否有安装包",
                    Charge: "是否收费",
                    LicenseQuotas: "License配额",
                    FreeQuotas: "冻结License配额",
                    UsedQuotas: "已用License配额",
                    RemainingAvailableQuotas: "剩余配额数",
                    PurchaseTime: "软件采购时间",
                    ExpireDate: "到期时间",
                    Availability: "软件有效性",
                    LicenseKey: "许可证号",
                    License: "许可证书",
                    LicenseAnnex: "许可证书附件",
                    Disable: "是否禁用",
                    Comments: "备注",
                },
                dialog: {
                    confirm: '确定',
                    cancel1: '取消',
                    reminder: '提示',
                    delete: '此操作将删除该行数据, 是否继续?',
                    deleteed: '删除成功!',
                    file: "本次未上传许可证附件",
                    oldupload: "本次上传将会替换掉以前的文件",
                    upload: "已取消上传",
                },
                event: {
                    purchaseTimeChangeTip: "购买时间不应大于当前时间",
                    purchaseTimeChange1Tip: "购买时间不应大于到期时间",
                    expireDateChangeTip: "到期时间不能小于购买时间",
                    AttentionTip: "您申请的软件的License配额不足，部门领导审批通过后才能采购，请提交后，耐心等待！",
                },
            },
            en: {
                Form: {
                    Depcnames: "Depcname",
                    //提示
                    selectReportSPASoftwareList: "Please select the name of the software you currently need",
                    oldupload: "This upload will replace the previous file",
                    upload: "Upload cancelled",
  
                    ProcessName: "Software purchase application",
                    ApplicantInformation: "Applicant Information",
                    RequestEquipmentInformation: "Request equipment information",
                    DetailSPASoftwareLists: "The software inventory record report",
                    ReportSPASoftwareLists: "Departmental procurement information",
                    TheNameOfTheSoftware: "The name of the software",
  
                    Yes: "Yes",
                    No: "No",
                    IDX: "NO.",
                    operating: "Operating",
                    Cancel: "Cancel",
                    Determine: "Determine",
                    Select: "Select",
                    Search: "Search",
  
  
                    Delegation: "Delegation",
                    DelegationPosition: "Delegation Position",
                    DelegationDepartment: "Delegation Department",
                    ApplyDate: "Apply Date",
                    Submitter: "Submitter",
                    ProcessNo: "Process No",
                    ISAgent: "ISAgent",
                    ApplicantBadge: "Applicant?Badge",
                    Applicant: "Applicant",
                    Floor: " Floor",
                    Room: "Room",
                    GroupLeader: "GroupLeader",
                    Jobcname: "Jobcname",
                    Depcname: "Depcname",
                    Site: "Company",
                    CostCenter: "Cost Center",
                    InstallComputerType: "Install Computer Type",
                    SoftwareType: "Software Type",
                    SoftwareName: "Software Name",
                    SoftwareVersion: "Software Version",
                    InstallationPackage: "Installation Package",
                    ComputerName: "Computer Name",
                    Quantity: "Quantity",
                    OriginalSoftwareManufacturer: "Original Software Manufacturer",
                    Charge: "Charge",
                    BudgetNumber: "Budget Number",
                    Attention: "Attention",
                    ReasonForApplication: "Reason For Application (Please specify the justification, and avoid only filling in vague descriptions such as ”work needs“) ",
                    //Notes: "Please specify the justification, and avoid only filling in vague descriptions such as ”work needs“",
  
                    //Detail
                    Depcname: "Depcname",
                    SoftwareType: "Software Type",
                    SoftwareName: "Software Name",
                    SoftwareVersion: "Software Version",
                    OriginalSoftwareManufacturer: "Original Software Manufacturer",
                    InstallationPackage: "Installation Package",
                    Charge: "Charge",
                    LicenseQuotas: "License Quotas ",
                    FreeQuotas: "Free Quotas",
                    UsedQuotas: "Used Quotas",
                    RemainingAvailableQuotas: "Remaining Available Quotas",
                    PurchaseTime: "Purchase Time",
                    ExpireDate: "Expire Date",
                    Availability: "Availability",
                    LicenseKey: "License Key",
                    License: "License",
                    LicenseAnnex: "License Annex",
                    Comments: "Comments",
  
                    AttachmentName: "Attachment Name",
                    UploadTime: "Upload Time",
                    Uploader: "Uploader",
                    Attachment: "Upload Attachment",
                    Attachment1: "Applicant uploads with printed documents",
                    deleteFile: "deleteFile",
                    Principal: "Principal",
                    dialog: {
                        confirm: 'confirm',
                        cancel1: 'cancel',
                        reminder: 'reminder',
                        delete: 'This operation will delete the row of data, whether to continue?',
                        deleteed: 'successfully deleted',
                        file: "The license attachment was not uploaded this time"
  
                    },
                },
                table: {
                    Search: 'Search',
                    Clear: 'Clear',
                    Add: 'Add',
                    Delete: 'Delete',
                    TemplateDownload: 'Template Download',
                    Import: 'Import',
                    Export: 'Export',
                    IDX: "NO.",
                    Operating: "Operating",
                    Edit: "Edit",
                    Enable: "Enable.",
                    Disable: "Disable.",
                    View: "View.",
                    Upload: "Upload.",
  
  
                    cancel: "Cancel",
                    confirm: "Confirm",
  
                    informationAssignment: "Tnformation Assignment",
                    Distribution: "Distribution.",
  
                    //Detail
                    Site: "Company",
                    Depcname: "Depcname",
                    SoftwareType: "Software Type",
                    SoftwareName: "Software Name",
                    SoftwareVersion: "Software Version",
                    OriginalSoftwareManufacturer: "Original Software Manufacturer",
                    InstallationPackage: "Installation Package",
                    Charge: "Charge",
                    LicenseQuotas: "License Quotas ",
                    FreeQuotas: "Free Quotas",
                    UsedQuotas: "Used Quotas",
                    RemainingAvailableQuotas: "Remaining Available Quotas",
                    PurchaseTime: "Purchase Time",
                    ExpireDate: "Expire Date",
                    Availability: "Availability",
                    LicenseKey: "License Key",
                    License: "License",
                    LicenseAnnex: "License Annex",
                    Disable: "Disable",
                    Comments: "Comments",
  
                },
                dialog: {
                    confirm: 'confirm',
                    cancel1: 'cancel',
                    reminder: 'reminder',
                    delete: 'This operation will delete the row of data, whether to continue?',
                    deleteed: 'successfully deleted',
                    file: "The license attachment was not uploaded this time",
                    oldupload: "This upload will replace the previous file",
                    upload: "Upload cancelled",
                },
                event: {
                    purchaseTimeChangeTip: "The purchase time should not be greater than the current time",
                    purchaseTimeChange1Tip: "The purchase time should not be greater than the expiration time",
                    expireDateChangeTip: "The expiration time cannot be less than the purchase time",
                    AttentionTip: "The software license that you're applying is insufficient, department head's approval is needed before purchasing. Please submit and wait patiently!",
                },
            }
        }
  
        KStarForm.onMergeLangMessages = () => {
  
            return FormLang
        };
  
  
  
  
        // //初始化数据后绑定之前
        // KStarForm.initFormDataAfter = function () {
        //     var _this = this
  
        //     KStarForm.vmFormData.NextApprover = "k2admin";
        //     KStarForm.vmFormData.NextActivityID = 2;
        //     //标题中英文
        //     if (KStarForm.vmFormData.vmUserLanguages == "en") {
        //         KStarForm.vmFormData.vmFormInstance.ProcessName += "流程";
        //     } else {
        //         KStarForm.vmFormData.vmFormInstance.ProcessName += "流程";
        //     }
        // }
  
        //初始化数据后绑定之前
        KStarForm.initFormDataAfter = function () {
            var _this = ctx;
  
            KStarForm.vmFormData.vmFormInstance.FormSubject="软件使用申请";
            // 初始一个标题，表单验证了标题不能为空.
  
            //引用赋值回来，方便迁移代码继续操作FormContentModel
          //   FormContentModel = formData.vmFormContent;
  
            //标题中英文
            if (KStarForm.vmFormData.vmUserLanguages == "en") {
                KStarForm.vmFormData.vmFormInstance.ProcessName = $tf("Form.ProcessName");
            }
            else {
                KStarForm.vmFormData.vmFormInstance.ProcessName = $tf("Form.ProcessName");
            }
            _this.langu = KStarForm.vmFormData.vmUserLanguages
            var userBadge = KStarForm.vmFormData.vmFormInstance.Badge
            KStarForm.vmFormData.vmFormContent.DetailSPASoftwareListIDOld = KStarForm.vmFormData.vmFormContent.DetailSPASoftwareListID;
            if (KStarForm.vmFormData.vmFormType == "Approval") {
                if (KStarForm.vmFormData.vmOperation.ActivityName == "040_IT部门采购") {
                    if (KStarForm.vmFormData.vmFormContent.DetailSPASoftwareListID) {
                        _this.isReportSPASoftwareListsHidden = true
                    }
                }
                else if (KStarForm.vmFormData.vmOperation.ActivityName == "050_IT部确认") {
                    _this.isReportSPASoftwareListsHidden = false
                    for (var i = 0; i < KStarForm.vmFormData.vmFormApprovalHistorys.length; i++) {
                        if (KStarForm.vmFormData.vmFormApprovalHistorys[i].ActivityName == "040_IT部门采购") {
                            _this.isReportSPASoftwareListsHidden = true;
                            return false;
                        }
                    }
                }
                else {
                    _this.isReportSPASoftwareListsHidden = false
                }
            }
            if (KStarForm.vmFormData.vmFormType == "Application") {
                //默认带出申请人信息
                _this.getApplicantInformationOfBadge(userBadge);
            }
            if (KStarForm.vmFormData.vmFormType == "Application" || KStarForm.vmFormData.vmFormType == "Draft") {
                KStarForm.vmFormData.vmFormInstance.SubmitDate = "";
            }
        }
  
        // 提交表单前
        KStarForm.onSubmitBefore = function () {
            return submitVerify(KStarForm.VM)
        }
        //提交前必填验证
        KStarForm.onReSubmitBefore = function () {
            return submitVerify(KStarForm.VM)
        }
  
        function submitVerify(_this) {
            if (KStarForm.vmFormData.vmUserLanguages == "en") {
                var costCenterTip = "The cost center is empty, please maintain it in the background"
                var DeptNameTip = "The department is empty, please maintain it in the background"
  
                var ComputerNameTip = "The computer name cannot be empty"
                var SoftwareTypeTip = "The software type cannot be empty"
                var SoftwareNameTip = "The software name cannot be empty"
                var SoftwareVersionTip = "The software version cannot be empty"
                var InstallationPackageTip = "Whether there is an installation package cannot be empty"
                var ChargeTip = "Whether the charge cannot be empty"
                var QuantityTip = "The number of applications cannot be empty"
                var SoftwareNameOfOtherTip = "The software name cannot be other"
                var AttentionTip = "The software license that you're applying is insufficient, department head's approval is needed before purchasing. Please submit and wait patiently!"
                var ReasonForApplicationTip = "The reason for application cannot be empty"
                var SubmitTip = "Unable to retrieve the personal position information and direct leadership information of the acting applicant. Currently, the application cannot be submitted. Please contact the 400 servicedesk"
            }
            else {
                var costCenterTip = "成本中心为空，请在后台维护"
                var DeptNameTip = "部门为空，请在后台维护"
                var ComputerNameTip = "计算机名不能为空"
                var SoftwareTypeTip = "软件类型不能为空"
                var SoftwareNameTip = "软件名称不能为空"
                var SoftwareVersionTip = "软件版本不能为空"
                var InstallationPackageTip = "是否有安装包不能为空"
                var ChargeTip = "是否收费不能为空"
                var QuantityTip = "申请数量不能为空"
                var SoftwareNameOfOtherTip = "软件名称不能为其他"
                var AttentionTip = "您申请的软件的License配额不足，部门领导审批通过后才能采购，请提交后，耐心等待！"
                var ReasonForApplicationTip = "申请原因不能为空"
                var SubmitTip = "无法检索到代理申请人的个人职位信息及直属领导信息，当前无法提交该申请，请联系400服务台"
            }
            if (!KStarForm.vmFormData.vmFormContent.CostCenter) { _this.$message({ showClose: true, message: costCenterTip, type: 'error' }); return false }
            if (!KStarForm.vmFormData.vmFormContent.Depcname) { _this.$message({ showClose: true, message: DeptNameTip, type: 'error' }); return false }
            if (!KStarForm.vmFormData.vmFormContent.ComputerName) { _this.$message({ showClose: true, message: ComputerNameTip, type: 'error' }); return false }
            if (!KStarForm.vmFormData.vmFormContent.SoftwareType) { _this.$message({ showClose: true, message: SoftwareTypeTip, type: 'error' }); return false }
            if (!KStarForm.vmFormData.vmFormContent.SoftwareName) { _this.$message({ showClose: true, message: SoftwareNameTip, type: 'error' }); return false }
            else {
                if (KStarForm.vmFormData.vmFormContent.SoftwareName == "其他" && KStarForm.vmFormData.vmFormContent.SoftwareType == "3") {
                    _this.$message({ showClose: true, message: SoftwareNameOfOtherTip, type: 'error' }); return false
                }
            }
            if (!KStarForm.vmFormData.vmFormContent.SoftwareVersion) { _this.$message({ showClose: true, message: SoftwareVersionTip, type: 'error' }); return false }
            if (!KStarForm.vmFormData.vmFormContent.InstallationPackage) { _this.$message({ showClose: true, message: InstallationPackageTip, type: 'error' }); return false }
            if (!KStarForm.vmFormData.vmFormContent.Charge) { _this.$message({ showClose: true, message: ChargeTip, type: 'error' }); return false }
            if (!KStarForm.vmFormData.vmFormContent.Quantity) { _this.$message({ showClose: true, message: QuantityTip, type: 'error' }); return false }
            if (!KStarForm.vmFormData.vmFormContent.ReasonForApplication) { _this.$message({ showClose: true, message: ReasonForApplicationTip, type: 'error' }); return false }
  
             
            var _bpmtoken = window.sessionStorage.getItem(KStarForm.tokenName);
            if (KStarForm.vmFormData.vmFormContent.DetailSPASoftwareListID) {
                var flag;
                $.ajax({
                    type: 'post',
                    async: false,
                    headers:{  "_bpmtoken":_bpmtoken }, 
                    url: KStarForm.bpmBaseUrl + "/AppicationForPurchase/SPASoftwareListReport/IsHaveRemainingAvailableQuotas",
                    data: { id: KStarForm.vmFormData.vmFormContent.DetailSPASoftwareListID },
                    dataType: 'text',
                    success: function (data) {
                        flag = data;
                    }
                });
  
                if (KStarForm.vmFormData.vmFormContent.SoftwareType == "2" || (KStarForm.vmFormData.vmFormContent.SoftwareType == "3" && KStarForm.vmFormData.vmFormContent.Charge == "1")) {
                    if (flag == "False") {
                        KStarForm.VM.$message({
                            showClose: true,
                            message: AttentionTip,
                            type: 'error'
                        });
                        KStarForm.vmFormData.vmFormContent.IsEnoughLicence = false;
                    }
                    else {
                        KStarForm.vmFormData.vmFormContent.IsEnoughLicence = true;
                    }
                }
            }
  
            if (KStarForm.vmFormData.vmFormContent.ISAgent == "1") {
                if (KStarForm.vmFormData.vmFormType != "ReApproval") {
                    //代理申请人职级不完整，无法提交申请
                    if (KStarForm.vmFormData.vmFormContent.GroupLeaderBadge != undefined && KStarForm.vmFormData.vmFormContent.GroupLeaderBadge != null && KStarForm.vmFormData.vmFormContent.GroupLeaderBadge != "") {
                        var arr;
                        var userAccount = KStarForm.vmFormData.vmFormContent.ApplicantAccount
                        $.ajax({
                            type: 'post',
                            async: false,
                            url: KStarForm.bpmBaseUrl + "/AppicationForPurchase/SoftwarePurchaseApplicationIndex/SearchUserToApprove",
                            data: { UserAD: userAccount, YWGrade: "" },
                            dataType: 'text',
                            success: function (res) {
                                arr = JSON.parse(JSON.parse(res).data)
                            }
                        });
                        if (arr[0].GroupLeaderUserAccount == undefined && arr[0].GroupLeaderUserAccount == null && arr[0].GroupLeaderUserAccount == "") {
                            _this.$message({ showClose: true, message: SubmitTip, type: 'error' }); return false
                        }
                    }
                    else {
                        _this.$message({ showClose: true, message: SubmitTip, type: 'error' }); return false
                    }
                }
            }
            KStarForm.vmFormData.vmFormContent.Delegation = KStarForm.vmFormData.vmFormInstance.ApplicantDisplayName
            KStarForm.vmFormData.vmFormContent.DelegationPosition = KStarForm.vmFormData.vmFormInstance.ApplicantPositionName
            KStarForm.vmFormData.vmFormContent.DelegationDepartment = KStarForm.vmFormData.vmFormInstance.ApplicantOrgName
            var now = new Date();
            var year = now.getFullYear(); //得到年份
            var month = now.getMonth();//得到月份
            var date = now.getDate();//得到日期
            var hour = now.getHours();//得到小时
            var minu = now.getMinutes();//得到分钟
            month = month + 1;
            if (month < 10) month = "0" + month;
            if (date < 10) date = "0" + date;
            if (hour < 10) hour = "0" + hour;
            if (minu < 10) minu = "0" + minu;
            var time = year + "-" + month + "-" + date + " " + hour + ":" + minu;
            KStarForm.vmFormData.vmFormContent.ApplyDate = time;
            KStarForm.vmFormData.vmFormContent.Submitter = KStarForm.vmFormData.vmFormInstance.SubmitterAccount
            return true;
        }
  
        //表单审批前
        KStarForm.onApproveBefore = function () {
            if (KStarForm.vmFormData.vmUserLanguages == "en") {
                var SoftwareTypeTip = "The software type cannot be empty"
                var SoftwareNameTip = "The software name cannot be empty"
                var SoftwareVersionTip = "The software version cannot be empty"
                var InstallationPackageTip = "Whether there is an installation package cannot be empty"
                var ChargeTip = "Whether the charge cannot be empty"
                var LicenseQuotasTip = "The License quota cannot be empty"
                var PurchaseTimeTip = "The software purchase time cannot be empty"
                var ExpireDateTip = "The expiration time cannot be empty"
                var AvailabilityTip = "Software validity cannot be empty"
                var AttentionTip = "There are not enough remaining License quotas, please return to the purchase node to alert the library"
                var AttentionTip1 = "There are not enough remaining License quotas, please enter them in the software inventory record report"
            }
            else {
                var SoftwareTypeTip = "软件类型不能为空"
                var SoftwareNameTip = "软件名称不能为空"
                var SoftwareVersionTip = "软件版本不能为空"
                var InstallationPackageTip = "是否有安装包不能为空"
                var ChargeTip = "是否收费不能为空"
                var LicenseQuotasTip = "License配额不能为空"
                var PurchaseTimeTip = "软件采购时间不能为空"
                var ExpireDateTip = "到期时间不能为空"
                var AvailabilityTip = "软件有效性不能为空"
                var AttentionTip = "剩余License配额不足，请返回采购节点提醒入库"
                var AttentionTip1 = "剩余License配额不足，请在软件清单记录报表中录入"
            }
            if (KStarForm.vmFormData.vmFormType == "Approval") {
                if (KStarForm.vmFormData.vmOperation.ActivityName == "040_IT部门采购") {
                    if (KStarForm.vmFormData.vmFormContent.reportSPASoftwareLists.length >= 1) {
                        if (!KStarForm.vmFormData.vmFormContent.reportSPASoftwareLists[0].SoftwareType) {
                            KStarForm.VM.$message({
                                showClose: true,
                                message: SoftwareTypeTip,
                                type: 'error'
                            });
                            return false
                        }
                        if (!KStarForm.vmFormData.vmFormContent.reportSPASoftwareLists[0].SoftwareName) {
                            KStarForm.VM.$message({
                                showClose: true,
                                message: SoftwareNameTip,
                                type: 'error'
                            });
                            return false
                        }
                        if (!KStarForm.vmFormData.vmFormContent.reportSPASoftwareLists[0].SoftwareVersion) {
                            KStarForm.VM.$message({
                                showClose: true,
                                message: SoftwareVersionTip,
                                type: 'error'
                            });
                            return false
                        }
                        if (!KStarForm.vmFormData.vmFormContent.reportSPASoftwareLists[0].InstallationPackage) {
                            KStarForm.VM.$message({
                                showClose: true,
                                message: InstallationPackageTip,
                                type: 'error'
                            });
                            return false
                        }
                        if (!KStarForm.vmFormData.vmFormContent.reportSPASoftwareLists[0].Charge) {
                            KStarForm.VM.$message({
                                showClose: true,
                                message: ChargeTip,
                                type: 'error'
                            });
                            return false
                        }
                        if (!KStarForm.vmFormData.vmFormContent.reportSPASoftwareLists[0].LicenseQuotas) {
                            KStarForm.VM.$message({
                                showClose: true,
                                message: LicenseQuotasTip,
                                type: 'error'
                            });
                            return false
                        }
                        if (!KStarForm.vmFormData.vmFormContent.reportSPASoftwareLists[0].PurchaseTime) {
                            KStarForm.VM.$message({
                                showClose: true,
                                message: PurchaseTimeTip,
                                type: 'error'
                            });
                            return false
                        }
                        if (!KStarForm.vmFormData.vmFormContent.reportSPASoftwareLists[0].ExpireDate) {
                            KStarForm.VM.$message({
                                showClose: true,
                                message: ExpireDateTip,
                                type: 'error'
                            });
                            return false
                        }
                        if (!KStarForm.vmFormData.vmFormContent.reportSPASoftwareLists[0].Availability) {
                            KStarForm.VM.$message({
                                showClose: true,
                                message: AvailabilityTip,
                                type: 'error'
                            });
                            return false
                        }
                    }
                }
                if (KStarForm.vmFormData.vmOperation.ActivityName == "050_IT部确认") {
                    if ((KStarForm.vmFormData.vmFormContent.SoftwareType == "2" || KStarForm.vmFormData.vmFormContent.SoftwareType == "3") && KStarForm.vmFormData.vmFormContent.Charge == "1") {
                        var isAfterANode = false;
                        for (var i = 0; i < KStarForm.vmFormData.vmFormApprovalHistorys.length; i++) {
                            if (KStarForm.vmFormData.vmFormApprovalHistorys[i].ActivityName == "040_IT部门采购") {
                                isAfterANode = true;
                                break;
                            }
                        }
                        if (KStarForm.vmFormData.vmFormContent.DetailSPASoftwareListID) {
                            var flag;
                            
  
                            $.ajax({
                                type: 'post',
                                async: false,
                                url: "/AppicationForPurchase/SPASoftwareListReport/IsHaveRemainingAvailableQuotas",
                                data: { id: KStarForm.vmFormData.vmFormContent.DetailSPASoftwareListID },
                                dataType: 'text',
                                success: function (data) {
                                    flag = data;
                                }
                            });
                            if (flag == "False") {
                                if (isAfterANode) {
                                    KStarForm.VM.$message({
                                        showClose: true,
                                        message: AttentionTip,
                                        type: 'error'
                                    });
                                }
                                else {
                                    KStarForm.VM.$message({
                                        showClose: true,
                                        message: AttentionTip1,
                                        type: 'error'
                                    });
                                }
                                return false;
                            }
                        }
                        else {
                            if (KStarForm.vmFormData.vmFormContent.SoftwareType == "2") {
                                var obj = {}
                                obj.SoftwareType = KStarForm.vmFormData.vmFormContent.SoftwareType
                                obj.SoftwareName = KStarForm.vmFormData.vmFormContent.SoftwareName
                                obj.SoftwareVersion = KStarForm.vmFormData.vmFormContent.SoftwareVersion
                                var flag;
                                $.ajax({
                                    type: 'post',
                                    async: false,
                                    url: "/AppicationForPurchase/SPASoftwareListReport/IsHaveQuotas",
                                    data: { model: obj },
                                    dataType: 'text',
                                    success: function (data) {
                                        flag = data;
                                    }
                                });
                                if (flag == "False") {
                                    if (isAfterANode) {
                                        KStarForm.VM.$message({
                                            showClose: true,
                                            message: AttentionTip,
                                            type: 'error'
                                        });
                                    }
                                    else {
                                        KStarForm.VM.$message({
                                            showClose: true,
                                            message: AttentionTip1,
                                            type: 'error'
                                        });
                                    }
                                    return false;
                                }
                            }
                        }
                    }
                }
            }
            return true;
        }
  
  
        // KStarForm.bpmBaseUrl=  'http://localhost:8080'; 
        KStarForm.init(proxy, "CommonForm");
  
        return {
            formData, bpmform, FormContentModel
        }
    },
    mounted: function () {
        var _this = this
        //	部门
        axios.post(KStarForm.bpmBaseUrl + '/AppicationForPurchase/Common/GetDepcnameOrSiteMain').then(function (res) {
            _this.depcnameArr = eval(res.data.data);
            //_this.depcnameArr.push({ "DeptName": "公共" })
        }).catch(function (error) {
            console.log(error);
        });
        //	公司
        axios.post(KStarForm.bpmBaseUrl + '/AppicationForPurchase/Common/GetCompanyList').then(function (res) {
            _this.siteArr = eval(res.data.data);
        }).catch(function (error) {
            console.log(error);
        });
        //软件类型
        axios.post(KStarForm.bpmBaseUrl + '/AppicationForPurchase/common/getattributesinfo?typename=' + encodeURIComponent('软件类型') + '&columnname=' + '').then(function (res) {
            _this.softwareTypeArr = eval(res.data.data);
        }).catch(function (error) {
            console.log(error);
        });
        //软件有效性
        axios.post(KStarForm.bpmBaseUrl + '/AppicationForPurchase/common/getattributesinfo?typename=' + encodeURIComponent('软件有效性') + '&columnname=' + '').then(function (res) {
            _this.availabilityArr = eval(res.data.data);
        }).catch(function (error) {
            console.log(error);
        });
    },
    computed: {
        // 业务表单是否可以编辑控制
        /*
          Draft：草稿
          Application：申请
          Approval：审批
          Communicated：沟通（沟通出去后）
          CommunicateFeedback：沟通反馈页面
          ReApproval：重新提交
          View：查看
        **/
        isEdit: function () {
            return this.formData.vmFormType == 'Application' || this.formData.vmFormType == 'Draft' || this.formData.vmFormType == 'ReApproval' ? true : false;
        },
        isdis: function () {
            this.isAgentDisable = (KStarForm.vmFormData.vmFormContent.ISAgent == '1' ? false : true);
            return KStarForm.vmFormData.vmFormContent.ISAgent == '2' ? false : true;
        },
        isNodeDisable: function () {
            return KStarForm.vmFormData.vmOperation.ActivityName == '040_IT部门采购' ? false : true;
        }
    },
    watch: {
        'vmFormContent.scoopel': function (newValue, oldValue) {
            var _this = this
            if (KStarForm.vmFormData.vmFormContent.scoopel.length <= 0) {
                _this.isScoopelHaveValue = true
            }
            else {
                _this.isScoopelHaveValue = false
            }
        },
        'vmFormContent.reportSPASoftwareLists': function (newValue, oldValue) {
            var _this = this
            if (KStarForm.vmFormData.vmFormContent.reportSPASoftwareLists.length <= 0) {
                _this.IsDetailSPASoftwareListsAdd = true
            }
            else {
                _this.IsDetailSPASoftwareListsAdd = false
            }
        },
        'vmFormContent.SoftwareType': function (newValue, oldValue) {
            var _this = this
            if ((newValue == 2 || newValue == 3) && KStarForm.vmFormData.vmFormContent.Charge == 1) {
                debugger
                if (KStarForm.vmFormData.vmFormContent.IsEnoughLicence == true) {
                    _this.isBudgetNumberHidden = true;
                }
                else {
                    _this.isBudgetNumberHidden = false;
                }
            }
            else {
                _this.isBudgetNumberHidden = true;
            }
        },
        'vmFormContent.Charge': function (newValue, oldValue) {
            var _this = this
            if ((KStarForm.vmFormData.vmFormContent.SoftwareType == 2 || KStarForm.vmFormData.vmFormContent.SoftwareType == 3) && newValue == 1) {
                debugger
                if (KStarForm.vmFormData.vmFormContent.IsEnoughLicence == true) {
                    _this.isBudgetNumberHidden = true;
                }
                else {
                    _this.isBudgetNumberHidden = false;
                }
            }
            else {
                _this.isBudgetNumberHidden = true;
            }
        }
    }
  }
  </script>
  
  <style>
  #app {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #2c3e50;
  }
  
  #TabDiv .el-form-item__label {
    width: 700px !important;
    /*            font-weight: bold !important;
      text-align: center !important;*/
  }
  </style>
  
  
  
  <style>
  #app {
    /* font-family: Avenir, Helvetica, Arial, sans-serif; */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #2c3e50;
  }
  
  
  
  body {
    background-color: #F5F8FD;
  }
  
  @media (min-width: 1200px) {
    .center {
        width: 1200px;
        margin: 0 auto;
    }
  }
  
  @media (max-width: 767px) {
    .pc-top-interval {
        display: none;
    }
  }
  </style>
  
  <style>
  .el-form--label-left .el-form-item__label {
    text-indent: 15px !important
  }
  
  #TabDiv .el-form-item__label {
    width: 700px !important;
    /*            font-weight: bold !important;
    text-align: center !important;*/
  }
  
  .el-table__body-wrapper .el-input--mini .el-input__inner {
    border: none
  }
  
  .el-table__body-wrapper .el-form-item--mini.el-form-item,
  .el-form-item--small.el-form-item {
    margin-bottom: 0px
  }
  
  .el-table__body-wrapper .el-select .el-input.is-focus .el-input__inner {
    border: none
  }
  
  .el-table__body-wrapper .el-input--suffix .el-input__inner {
    border: none
  }
  
  .el-table__body-wrapper .el-input--mini .el-input__inner {
    height: 28px !important;
    line-height: 28px !important
  }
  
  .el-form-item__label {
    /* 字体大小 */
    font-size: 13px;
    /* 字体超出隐藏变省略号 */
    overflow: hidden;
    text-overflow: ellipsis;
    /* 不换行 */
    white-space: nowrap;
  }
  
  .add {
    height: 30px;
    color: rgb(170, 170, 170) !important;
    background: #fff;
    text-align: center;
    cursor: pointer;
    line-height: 30px;
    font-size: 12px !important;
    border: 1px dashed #ccc
  }
  
  .add:hover {
    background: rgb(235, 245, 255);
    color: #409eff !important
  }
  
  .box {
    margin-top: 40px
  }
  
  .TLFormCss .view-body .el-form-item__label {
    line-height: 40px !important;
  }
  
  .TLFormCss .view-body .el-form-item__content {
    line-height: 40px !important;
  }
  
  .TLFormCss .view-body .el-form-item__content {
    flex: none !important;
    margin-left: 155PX !important;
  }
  
  .TLFormCss .el-form-item__label {
    line-height: 40px !important;
  }
  
  .TLFormCss .el-form-item__content {
    line-height: 40px !important;
  }
  
  .TLFormCss .el-form-item__content {
    flex: none !important;
    margin-left: 155PX !important;
  }
  
  .TLFormCssFooter {
    padding: 20px 20px 10px;
    text-align: right;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
  }
  </style>